@@ -183,29 +183,33 @@ def test_query_object_ids(self, temp_dir):
183
183
def test_null_response (self , temp_dir , function ):
184
184
simbad = Simbad ()
185
185
simbad .cache_location = temp_dir
186
- assert (simbad .__getattribute__ (function )('idonotexist' )
187
- is None )
186
+ with pytest .warns (BadRowWarning ):
187
+ assert (simbad .__getattribute__ (function )('idonotexist' )
188
+ is None )
188
189
189
190
# Special case of null test: list of nonexistent parameters
190
191
def test_query_objects_null (self , temp_dir ):
191
192
simbad = Simbad ()
192
193
simbad .cache_location = temp_dir
193
- assert simbad .query_objects (['idonotexist' , 'idonotexisteither' ]) is None
194
+ with pytest .warns (BadRowWarning ):
195
+ assert simbad .query_objects (['idonotexist' , 'idonotexisteither' ]) is None
194
196
195
197
# Special case of null test: zero-sized region
196
198
def test_query_region_null (self , temp_dir ):
197
199
simbad = Simbad ()
198
200
simbad .cache_location = temp_dir
199
- result = simbad .query_region (SkyCoord ("00h01m0.0s 00h00m0.0s" ), radius = "0d" ,
200
- equinox = 2000.0 , epoch = 'J2000' )
201
+ with pytest .warns (BadRowWarning ):
202
+ result = simbad .query_region (SkyCoord ("00h01m0.0s 00h00m0.0s" ), radius = "0d" ,
203
+ equinox = 2000.0 , epoch = 'J2000' )
201
204
assert result is None
202
205
203
206
# Special case of null test: very small region
204
207
def test_query_small_region_null (self , temp_dir ):
205
208
simbad = Simbad ()
206
209
simbad .cache_location = temp_dir
207
- result = simbad .query_region (SkyCoord ("00h01m0.0s 00h00m0.0s" ), radius = 1.0 * u .marcsec ,
208
- equinox = 2000.0 , epoch = 'J2000' )
210
+ with pytest .warns (BadRowWarning ):
211
+ result = simbad .query_region (SkyCoord ("00h01m0.0s 00h00m0.0s" ), radius = 1.0 * u .marcsec ,
212
+ equinox = 2000.0 , epoch = 'J2000' )
209
213
assert result is None
210
214
211
215
# Special case : zero-sized region with one object
0 commit comments