Skip to content

Commit 96613d1

Browse files
committed
Cleanup asserts
1 parent 6b2bd4c commit 96613d1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

astroquery/mast/tests/test_mast_remote.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def test_catalogs_query_region(self):
334334
catalog="Gaia")
335335
row = np.where(result['source_id'] == '3774902350511581696')
336336
assert isinstance(result, Table)
337-
assert result[row]['solution_id'].item() == '1635721458409799680'
337+
assert result[row]['solution_id'] == '1635721458409799680'
338338

339339
result = mast.Catalogs.query_region("322.49324 12.16683",
340340
radius=0.01*u.deg,
@@ -352,16 +352,16 @@ def test_catalogs_query_region(self):
352352
magtype=2)
353353
row = np.where(result['MatchID'] == '82368728')
354354
assert isinstance(result, Table)
355-
assert result[row]['NumImages'].item() == 11
356-
assert result[row]['TargetName'].item() == 'NGC7078'
355+
assert result[row]['NumImages'] == 11
356+
assert result[row]['TargetName'] == 'NGC7078'
357357

358358
result = mast.Catalogs.query_region("322.49324 12.16683",
359359
radius=in_radius,
360360
catalog="Gaia",
361361
version=1)
362362
row = np.where(result['source_id'] == '1745948323734098688')
363363
assert isinstance(result, Table)
364-
assert result[row]['solution_id'].item() == '1635378410781933568'
364+
assert result[row]['solution_id'] == '1635378410781933568'
365365

366366
result = mast.Catalogs.query_region("322.49324 12.16683",
367367
radius=in_radius,
@@ -370,14 +370,14 @@ def test_catalogs_query_region(self):
370370

371371
row = np.where(result['source_id'] == '1745973204477191424')
372372
assert isinstance(result, Table)
373-
assert result[row]['solution_id'].item() == '1635721458409799680'
373+
assert result[row]['solution_id'] == '1635721458409799680'
374374

375375
result = mast.Catalogs.query_region("322.49324 12.16683",
376376
radius=in_radius, catalog="panstarrs",
377377
table="mean")
378378
row = np.where((result['objName'] == 'PSO J322.4622+12.1920') & (result['yFlags'] == 16777496))
379379
assert isinstance(result, Table)
380-
assert result[row]['distance'].item() == 0.039381703406789904
380+
np.testing.assert_allclose(result[row]['distance'], 0.039381703406789904)
381381

382382
result = mast.Catalogs.query_region("322.49324 12.16683",
383383
radius=in_radius, catalog="panstarrs",
@@ -399,7 +399,7 @@ def test_catalogs_query_region(self):
399399
catalog="tic")
400400
row = np.where(result['ID'] == '841736289')
401401
assert isinstance(result, Table)
402-
assert result[row]['RA_orig'] == 158.475246786483
402+
np.testing.assert_allclose(result[row]['RA_orig'], 158.475246786483)
403403
assert result[row]['gaiaqflag'] == 1
404404

405405
result = mast.Catalogs.query_region("158.47924 -7.30962",

0 commit comments

Comments
 (0)