Skip to content

Commit 2a3f17d

Browse files
committed
TST: adding and updating tests for include_metadata_tables
1 parent ff3308f commit 2a3f17d

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

astroquery/ipac/irsa/tests/test_irsa_remote.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,26 @@ def test_list_columns(self):
7272
def test_list_catalogs(self):
7373
catalogs = Irsa.list_catalogs()
7474
# Number of available catalogs may change over time, test only for significant drop.
75-
# (at the time of writing there are 933 tables in the list).
76-
assert len(catalogs) > 900
75+
# (at the time of writing there are 645 tables in the list).
76+
assert len(catalogs) > 640
7777
assert isinstance(catalogs, dict)
7878

79+
catalogs_full = Irsa.list_catalogs(full=True)
80+
assert isinstance(catalogs_full, Table)
81+
7982
def test_list_catalogs_filter(self):
80-
spitzer_catalogs = Irsa.list_catalogs(filter='spitzer')
83+
spitzer_catalogs = Irsa.list_catalogs(filter='allwise')
84+
85+
assert len(spitzer_catalogs) == 13
86+
87+
def test_list_catalogs_metadata(self):
88+
catalogs = Irsa.list_catalogs(filter='wise')
89+
all_tables = Irsa.list_catalogs(filter='wise', include_metadata_tables=True)
90+
91+
assert len(catalogs) < len(all_tables)
8192

82-
assert len(spitzer_catalogs) == 142
93+
assert 'wise.wise_allwise_p3am_cdd' not in catalogs
94+
assert 'wise.wise_allwise_p3am_cdd' in all_tables
8395

8496
@pytest.mark.parametrize('servicetype', (None, 'sia', 'ssa'))
8597
def test_list_collections(self, servicetype):

0 commit comments

Comments
 (0)