Skip to content

Commit

Permalink
Merge pull request #2886 from alteholz/test.alfalfa
Browse files Browse the repository at this point in the history
alfalfa: add some tests to increase test coverage from 95 to 100 percent
  • Loading branch information
bsipocz authored Dec 8, 2023
2 parents 60e6353 + a681d3f commit 5600762
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions astroquery/alfalfa/tests/test_alfalfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def data_path(filename):

# Test Case: A Seyfert 1 galaxy
coords = coordinates.SkyCoord('0h8m05.63s +14d50m23.3s')
coordsOC = coordinates.SkyCoord(0.59583, 27.21056, unit='deg')

ALFALFA = alfalfa.core.Alfalfa()

Expand All @@ -75,3 +76,7 @@ def test_alfalfa_catalog(patch_get, patch_get_readable_fileobj, coords=coords):
def test_alfalfa_crossID(patch_get, patch_get_readable_fileobj, coords=coords):
agc = ALFALFA.query_region(coords, optical_counterpart=True)
assert agc == 100051
agc = ALFALFA.query_region(coordsOC, optical_counterpart=False)
assert agc == 12920
agc = ALFALFA.query_region(coordsOC, optical_counterpart=False, radius='0 arcmin')
assert agc is None

0 comments on commit 5600762

Please sign in to comment.