Skip to content

Commit e3c7017

Browse files
committed
TST: fix failing remote tests
1 parent fd36c12 commit e3c7017

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

astroquery/vizier/tests/test_vizier_remote.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ def test_query_region_async_galactic(self):
4949
assert "-c=G" in payload
5050

5151
def test_query_Vizier_instance(self):
52-
v = vizier.core.Vizier(
53-
columns=['_RAJ2000', 'DEJ2000', 'B-V', 'Vmag', 'Plx'],
54-
column_filters={"Vmag": ">10"}, keywords=["optical", "xry"])
52+
with pytest.warns(UserWarning, match="xry : No such keyword"):
53+
v = vizier.core.Vizier(
54+
columns=['_RAJ2000', 'DEJ2000', 'B-V', 'Vmag', 'Plx'],
55+
column_filters={"Vmag": ">10"}, keywords=["optical", "xry"])
5556

5657
result = v.query_object("HD 226868", catalog=["NOMAD", "UCAC"])
5758
assert isinstance(result, commons.TableList)
@@ -64,7 +65,7 @@ def test_vizier_column_restriction(self):
6465
# catalogs include Bmag's
6566
v = vizier.core.Vizier(
6667
columns=['_RAJ2000', 'DEJ2000', 'B-V', 'Vmag', 'Plx'],
67-
column_filters={"Vmag": ">10"}, keywords=["optical", "xry"])
68+
column_filters={"Vmag": ">10"}, keywords=["optical", "X-ray"])
6869

6970
result = v.query_object("HD 226868", catalog=["NOMAD", "UCAC"])
7071
for table in result:
@@ -97,7 +98,8 @@ def test_regressiontest_invalidtable(self):
9798
keywords=['Radio', 'IR'], row_limit=5000)
9899
C = SkyCoord(359.61687 * u.deg, -0.242457 * u.deg, frame="galactic")
99100

100-
V.query_region(C, radius=2 * u.arcmin)
101+
with pytest.warns(UserWarning, match="VOTABLE parsing raised exception"):
102+
V.query_region(C, radius=2 * u.arcmin)
101103

102104
def test_multicoord(self):
103105

docs/vizier/vizier.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ on the Vizier class.
230230
231231
>>> v = Vizier(columns=['_RAJ2000', '_DEJ2000','B-V', 'Vmag', 'Plx'],
232232
... column_filters={"Vmag":">10"}, keywords=["optical", "xry"])
233-
234233
WARNING: xry : No such keyword [astroquery.vizier.core]
235234
236235
Note that whenever an unknown keyword is specified, a warning is emitted and

0 commit comments

Comments
 (0)