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
44import astropy .units as u
5+ from astropy import coordinates
56from ... import vizier
67from ...utils import commons
78import 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