Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop the no longer needed tests/helpers.py #132

Merged
merged 1 commit into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading