Skip to content

Commit afaf827

Browse files
committed
TST: Drop deprecated astropy.tests.helper.raises (#546)
1 parent cd48833 commit afaf827

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

skypy/utils/tests/test_special.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
import numpy.testing as npt
33
from astropy.utils.data import get_pkg_data_filename
4-
from astropy.tests.helper import raises
4+
import pytest
55

66
from skypy.utils.special import gammaincc
77

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

8282

83-
@raises(ValueError)
8483
def test_gammaincc_neg_x_scalar():
8584
# negative x raises an exception
86-
gammaincc(0.5, -1.0)
85+
with pytest.raises(ValueError):
86+
gammaincc(0.5, -1.0)
8787

8888

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

0 commit comments

Comments
 (0)