Skip to content

Commit

Permalink
maint: switch to tests with less data to download
Browse files Browse the repository at this point in the history
  • Loading branch information
ManonMarchand committed Jun 11, 2024
1 parent cf60938 commit 947814b
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions astroquery/vizier/tests/test_vizier_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from astroquery.utils import commons
from .conftest import scalar_skycoord, vector_skycoord

vizier.Vizier.clear_cache()


@pytest.mark.remote_data
class TestVizierRemote:
Expand Down Expand Up @@ -94,7 +96,7 @@ def test_query_two_wavelengths(self):
v = vizier.core.Vizier(
columns=['_RAJ2000', 'DEJ2000', 'B-V', 'Vmag', 'Plx'],
column_filters={"Vmag": ">10"}, keywords=["optical", "radio"])

v.ROW_LIMIT = 1
v.query_object('M 31')

def test_regressiontest_invalidtable(self):
Expand Down Expand Up @@ -127,22 +129,16 @@ def test_multicoord(self):

def test_findcatalog_maxcatalog(self):
V = vizier.core.Vizier()
cats = V.find_catalogs('eclipsing binary', max_catalogs=5000)
assert len(cats) >= 468

# with pytest.raises(ValueError) as exc:
# V.find_catalogs('eclipsing binary')
# assert str(exc.value)==("Maximum number of catalogs exceeded."
# " Try setting max_catalogs "
# "to a large number and try again")
cats = V.find_catalogs('eclipsing binary planets', max_catalogs=5000)
assert len(cats) >= 39 # as of 2024

def test_findcatalog_ucd(self):
V = vizier.core.Vizier()
ucdresult = V(ucd='time.age*').find_catalogs('eclipsing binary', max_catalogs=5000)
result = V.find_catalogs('eclipsing binary', max_catalogs=5000)
ucdresult = V(ucd='phys.albedo').find_catalogs('mars', max_catalogs=5000)
result = V.find_catalogs('mars', max_catalogs=5000)

assert len(ucdresult) >= 12 # count as of 1/15/2018
assert len(result) >= 628
assert len(ucdresult) >= 1
assert len(result) >= 11
# important part: we're testing that UCD is parsed and some catalogs are ruled out
assert len(ucdresult) < len(result)

Expand Down

0 comments on commit 947814b

Please sign in to comment.