Skip to content

Commit

Permalink
Drop the no longer needed tests/helpers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
avalentino committed Oct 28, 2023
1 parent 6a819bd commit 44d19a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 130 deletions.
122 changes: 0 additions & 122 deletions erfa/tests/helper.py

This file was deleted.

9 changes: 2 additions & 7 deletions erfa/tests/test_erfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from numpy.testing import assert_array_equal, assert_array_almost_equal, assert_allclose

import erfa
from erfa.tests.helper import catch_warnings

try:
from astropy.time import Time
Expand Down Expand Up @@ -172,18 +171,14 @@ def test_errwarn_reporting():
erfa.dat(1990, 1, 1, 0.5)

# check warning is raised for a scalar
with catch_warnings() as w:
with pytest.warns(erfa.ErfaWarning, match=r'1 of "dubious year \(Note 1\)"') as w:
erfa.dat(100, 1, 1, 0.5)
assert len(w) == 1
assert w[0].category == erfa.ErfaWarning
assert '1 of "dubious year (Note 1)"' in str(w[0].message)

# and that the count is right for a vector.
with catch_warnings() as w:
with pytest.warns(erfa.ErfaWarning, match=r'2 of "dubious year \(Note 1\)"') as w:
erfa.dat([100, 200, 1990], 1, 1, 0.5)
assert len(w) == 1
assert w[0].category == erfa.ErfaWarning
assert '2 of "dubious year (Note 1)"' in str(w[0].message)

try:
erfa.dat(1990, [1, 34, 2], [1, 1, 43], 0.5)
Expand Down
2 changes: 1 addition & 1 deletion liberfa/erfa
Submodule erfa updated 259 files

0 comments on commit 44d19a9

Please sign in to comment.