Skip to content

Commit f45f4f6

Browse files
committed
fix a regression test that had been skipped and add some essential
imports in vizier remote testing
1 parent d92a0e8 commit f45f4f6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

astroquery/vizier/tests/test_vizier_remote.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22

3-
from astropy.tests.helper import remote_data
3+
from astropy.tests.helper import remote_data,pytest
44
import astropy.units as u
5+
from astropy import coordinates
56
from ... import vizier
67
from ...utils import commons
78
import requests
@@ -59,8 +60,8 @@ def test_query_two_wavelengths(self):
5960
column_filters={"Vmag":">10"}, keywords=["optical", "radio"])
6061
v.query_object('M 31')
6162

62-
def regressiontest_invalidtable(self):
63-
V = Vizier(columns=['all'], ucd='(spect.dopplerVeloc*|phys.veloc*)',
63+
def test_regressiontest_invalidtable(self):
64+
V = vizier.core.Vizier(columns=['all'], ucd='(spect.dopplerVeloc*|phys.veloc*)',
6465
keywords=['Radio', 'IR'], row_limit=5000)
6566
C = coordinates.SkyCoord(359.61687 * u.deg, -0.242457 * u.deg, frame='galactic')
6667

@@ -81,12 +82,12 @@ def test_multicoord(self):
8182
assert result['I/239/hip_main']['HIP'] == 98298
8283

8384
def test_findcatalog_maxcatalog(self):
84-
V = Vizier()
85-
cats = Vizier.find_catalogs('eclipsing binary', max_catalogs=5000)
85+
V = vizier.core.Vizier()
86+
cats = V.find_catalogs('eclipsing binary', max_catalogs=5000)
8687
assert len(cats) >= 468
8788

8889
with pytest.raises(ValueError) as exc:
89-
Vizier.find_catalogs('eclipsing binary')
90+
V.find_catalogs('eclipsing binary')
9091
assert str(exc.value)==("Maximum number of catalogs exceeded."
9192
" Try setting max_catalogs "
9293
"to a large number and try again")

0 commit comments

Comments
 (0)