Skip to content

Commit be6f9c5

Browse files
committed
fixing existing tests
1 parent 2e09e9e commit be6f9c5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

astroquery/sdss/tests/test_sdss.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def image_tester(images, filetype):
164164
@pytest.mark.parametrize("dr", dr_list)
165165
def test_sdss_spectrum(patch_request, patch_get_readable_fileobj, dr,
166166
coords=coords):
167-
xid = sdss.SDSS.query_region(coords, data_release=dr, spectro=True)
167+
xid = sdss.SDSS.query_region(coords, radius=Angle('2 arcsec'), data_release=dr, spectro=True)
168168
url_tester_crossid(dr)
169169
sp = sdss.SDSS.get_spectra(matches=xid, data_release=dr)
170170
image_tester(sp, 'spectra')
@@ -213,7 +213,7 @@ class = 'galaxy'
213213
@pytest.mark.parametrize("dr", dr_list)
214214
def test_sdss_image_from_query_region(patch_request, patch_get_readable_fileobj,
215215
dr, coords=coords):
216-
xid = sdss.SDSS.query_region(coords, data_release=dr)
216+
xid = sdss.SDSS.query_region(coords, radius=Angle('2 arcsec'), data_release=dr)
217217
url_tester_crossid(dr)
218218
# TODO test what img is
219219
img = sdss.SDSS.get_images(matches=xid)
@@ -273,7 +273,7 @@ def test_sdss_photoobj(patch_request, dr):
273273

274274
@pytest.mark.parametrize("dr", dr_list)
275275
def test_list_coordinates(patch_request, dr):
276-
xid = sdss.SDSS.query_region(coords_list, data_release=dr)
276+
xid = sdss.SDSS.query_region(coords_list, radius=Angle('2 arcsec'), data_release=dr)
277277

278278
with warnings.catch_warnings():
279279
if sys.platform.startswith('win'):
@@ -290,7 +290,7 @@ def test_list_coordinates(patch_request, dr):
290290

291291
@pytest.mark.parametrize("dr", dr_list)
292292
def test_column_coordinates(patch_request, dr):
293-
xid = sdss.SDSS.query_region(coords_column, data_release=dr)
293+
xid = sdss.SDSS.query_region(coords_column, radius=Angle('2 arcsec'), data_release=dr)
294294

295295
with warnings.catch_warnings():
296296
if sys.platform.startswith('win'):
@@ -307,7 +307,7 @@ def test_column_coordinates(patch_request, dr):
307307

308308
def test_query_timeout(patch_request_slow, coord=coords):
309309
with pytest.raises(TimeoutError):
310-
sdss.SDSS.query_region(coords, timeout=1)
310+
sdss.SDSS.query_region(coords, radius=Angle('2 arcsec'), timeout=1)
311311

312312

313313
def test_spectra_timeout(patch_request, patch_get_readable_fileobj_slow):
@@ -387,7 +387,7 @@ def test_list_coordinates_region_payload(patch_request, dr):
387387
"p.ra, p.dec, p.objid, p.run, p.rerun, p.camcol, p.field "
388388
"FROM #upload u JOIN #x x ON x.up_id = u.up_id JOIN PhotoObjAll AS p ON p.objID = x.objID "
389389
"ORDER BY x.up_id")
390-
query_payload = sdss.SDSS.query_region(coords_list, radius=Angle('3 arcsec'),
390+
query_payload = sdss.SDSS.query_region(coords_list, radius=Angle('2 arcsec'),
391391
get_query_payload=True,
392392
data_release=dr)
393393
assert query_payload['uquery'] == expect
@@ -401,7 +401,7 @@ def test_column_coordinates_region_payload(patch_request, dr):
401401
"p.ra, p.dec, p.objid, p.run, p.rerun, p.camcol, p.field "
402402
"FROM #upload u JOIN #x x ON x.up_id = u.up_id JOIN PhotoObjAll AS p ON p.objID = x.objID "
403403
"ORDER BY x.up_id")
404-
query_payload = sdss.SDSS.query_region(coords_column, radius=Angle('3 arcsec'),
404+
query_payload = sdss.SDSS.query_region(coords_column, radius=Angle('2 arcsec'),
405405
get_query_payload=True,
406406
data_release=dr)
407407
assert query_payload['uquery'] == expect
@@ -417,7 +417,7 @@ def test_column_coordinates_region_spectro_payload(patch_request, dr):
417417
"FROM #upload u JOIN #x x ON x.up_id = u.up_id JOIN PhotoObjAll AS p ON p.objID = x.objID "
418418
"JOIN SpecObjAll AS s ON p.objID = s.bestObjID "
419419
"ORDER BY x.up_id")
420-
query_payload = sdss.SDSS.query_region(coords_column, radius=Angle('3 arcsec'),
420+
query_payload = sdss.SDSS.query_region(coords_column, radius=Angle('2 arcsec'),
421421
spectro=True,
422422
get_query_payload=True,
423423
data_release=dr)
@@ -432,7 +432,7 @@ def test_column_coordinates_region_payload_custom_fields(patch_request, dr):
432432
"p.r, p.psfMag_r "
433433
"FROM #upload u JOIN #x x ON x.up_id = u.up_id JOIN PhotoObjAll AS p ON p.objID = x.objID "
434434
"ORDER BY x.up_id")
435-
query_payload = sdss.SDSS.query_region(coords_column, radius=Angle('3 arcsec'),
435+
query_payload = sdss.SDSS.query_region(coords_column, radius=Angle('2 arcsec'),
436436
get_query_payload=True,
437437
fields=['r', 'psfMag_r'],
438438
data_release=dr)
@@ -579,10 +579,10 @@ def test_field_help_region(patch_request):
579579
assert isinstance(valid_field, dict)
580580
assert 'photoobj_all' in valid_field
581581

582-
existing_p_field = sdss.SDSS.query_region(coords,
582+
existing_p_field = sdss.SDSS.query_region(coords, radius=Angle('2 arcsec'),
583583
field_help='psfMag_r')
584584

585-
existing_s_field = sdss.SDSS.query_region(coords,
585+
existing_s_field = sdss.SDSS.query_region(coords, radius=Angle('2 arcsec'),
586586
field_help='spectroSynFlux_r')
587587

588588
with pytest.warns(UserWarning, match="nonexist isn't a valid 'photobj_field' or 'specobj_field'"):

0 commit comments

Comments
 (0)