Skip to content

Commit

Permalink
TST: Drop deprecated astropy.tests.helper.raises (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrjbca authored May 23, 2022
1 parent f30489c commit 270dc33
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions skypy/utils/tests/test_special.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import numpy.testing as npt
from astropy.utils.data import get_pkg_data_filename
from astropy.tests.helper import raises
import pytest

from skypy.utils.special import gammaincc

Expand Down Expand Up @@ -80,13 +80,13 @@ def test_gammaincc_precision():
npt.assert_allclose(g, v, rtol=1e-10, atol=0, err_msg='\n'.join(lines))


@raises(ValueError)
def test_gammaincc_neg_x_scalar():
# negative x raises an exception
gammaincc(0.5, -1.0)
with pytest.raises(ValueError):
gammaincc(0.5, -1.0)


@raises(ValueError)
def test_gammaincc_neg_x_array():
# negative x in array raises an exception
gammaincc(0.5, [3.0, 2.0, 1.0, 0.0, -1.0])
with pytest.raises(ValueError):
gammaincc(0.5, [3.0, 2.0, 1.0, 0.0, -1.0])

0 comments on commit 270dc33

Please sign in to comment.