Skip to content

Commit 35b13ec

Browse files
committed
Add a new test for SimbadClass.query_region()
The new test asserts that the expected `ValueError` is raised if multiple coordinates are specified together with an incompatible number of radii.
1 parent df05c63 commit 35b13ec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

astroquery/simbad/tests/test_simbad.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,11 @@ def test_query_region_radius_error(patch_post, coordinates, radius,
284284
coordinates, radius=radius, equinox=equinox, epoch=epoch)
285285

286286

287+
def test_query_region_coord_radius_mismatch():
288+
with pytest.raises(ValueError, match="^Mismatch between radii and coordinates$"):
289+
simbad.SimbadClass().query_region(multicoords, radius=[1, 2, 3] * u.deg)
290+
291+
287292
@pytest.mark.parametrize(('coordinates', 'radius', 'equinox', 'epoch'),
288293
[(ICRS_COORDS, "0d", 2000.0, 'J2000'),
289294
(GALACTIC_COORDS, 1.0 * u.marcsec, 2000.0, 'J2000')

0 commit comments

Comments
 (0)