Skip to content

Commit 072b105

Browse files
committed
Fix faling remote tests. keplertimeseries is now in TAP and does not require filter criteria, but it is a very large table and will take a long time to return if no filter criteria are given. Same is true for the skipped tests for kelttimeseries and superwasptimeseries. The error thrown for the keplertimeseries test was actually because no KEPID column exists; this should now be star_id. The 2nd fail was from an assumption that the cumulative table is not in TAP and would return a dict if asking to return the payload, which is no longer true -- now asserting string as expected. The 3rd failure was from a unit conversion warning for st_lumerr and is unrelated to testing the case sensitivity. Setting a selection will avoid tripping the test.
1 parent c17d57d commit 072b105

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

astroquery/ipac/nexsci/nasa_exoplanet_archive/tests/test_nasa_exoplanet_archive_remote.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ def test_invalid_query_exoplanets():
3434

3535

3636
@pytest.mark.remote_data
37-
def test_missing_criterion_kepler():
37+
def test_invalid_query_kepler():
3838
with pytest.raises(InvalidQueryError) as error:
3939
NasaExoplanetArchive.query_criteria("keplertimeseries", where="kepid=8561063")
40-
assert "Queries against the Kepler Time Series table require" in str(error)
41-
NasaExoplanetArchive.query_criteria("keplertimeseries", kepid=8561063, quarter=14)
40+
assert "'KEPID': invalid identifier" in str(error)
41+
NasaExoplanetArchive.query_criteria("keplertimeseries", where="star_id=8561063")
4242

4343

4444
@pytest.mark.skip('TMP skip, server stuck with query')
@@ -135,10 +135,10 @@ def test_request_to_sql():
135135

136136
assert payload_sql == "select * from ps where hostname like 'Kepler%' order by hostname"
137137

138-
# "cumulative" table is not in TAP_TABLES, payload is sent directly as GET params
138+
# "cumulative" table is now in TAP_TABLES
139139
payload_dict = NasaExoplanetArchive.query_criteria(table="cumulative", where="pl_hostname like 'Kepler%'",
140140
order="pl_hostname", get_query_payload=True)
141-
assert isinstance(payload_dict, dict)
141+
assert isinstance(payload_dict, str)
142142

143143

144144
@pytest.mark.remote_data
@@ -190,5 +190,5 @@ def test_format():
190190
@pytest.mark.remote_data
191191
def test_table_case_sensivity():
192192
# Regression test from #3090
193-
table = NasaExoplanetArchive.query_criteria(table='DI_STARS_EXEP', select='*')
193+
table = NasaExoplanetArchive.query_criteria(table='DI_STARS_EXEP', select='tic_id')
194194
assert len(table) > 0

0 commit comments

Comments
 (0)