1212# ASTROPY
1313from astropy import units as u
1414from astropy .coordinates import ICRS , SkyCoord
15+ from astropy .io .votable .exceptions import W25
1516from astropy .io .votable .tree import Table as VOTable
1617from astropy .table import Table
1718from astropy .utils .data import get_pkg_data_filename
@@ -81,6 +82,7 @@ def test_no_result_astroquery(self):
8182 service_url = self .url )
8283 assert result is None
8384
85+ @pytest .mark .filterwarnings ('ignore::astropy.io.votable.exceptions.W25' )
8486 @pytest .mark .parametrize (('center' , 'radius' ),
8587 [((SCS_RA , SCS_DEC ), SCS_SR ),
8688 (SCS_CENTER , SCS_RADIUS )])
@@ -113,7 +115,7 @@ def test_sky_coord_classic(self):
113115
114116 def test_timeout_classic (self ):
115117 """Test timed out query."""
116- with pytest .warns (NoResultsWarning , match = 'timed out' ):
118+ with pytest .warns (W25 , match = 'timed out' ):
117119 with conf .set_temp ('timeout' , 1e-6 ):
118120 result = conesearch .conesearch (
119121 SCS_CENTER , SCS_RADIUS , cache = False ,
@@ -142,6 +144,7 @@ def test_searches_classic(self):
142144 assert tab_2 .url == tab_4 .url
143145 np .testing .assert_array_equal (tab_2 .array , tab_4 .array )
144146
147+ @pytest .mark .filterwarnings ('ignore::astropy.io.votable.exceptions.W25' )
145148 @pytest .mark .parametrize (('center' , 'radius' ),
146149 [((SCS_RA , SCS_DEC ), SCS_SR ),
147150 (SCS_CENTER , SCS_RADIUS )])
@@ -156,6 +159,7 @@ def test_search_all(self, center, radius):
156159
157160 assert tab_1 .array .size > 0
158161
162+ @pytest .mark .filterwarnings ('ignore::astropy.io.votable.exceptions.W25' )
159163 def test_async (self ):
160164 async_search = conesearch .AsyncConeSearch (
161165 SCS_CENTER , SCS_RADIUS , return_astropy_table = False )
@@ -172,6 +176,7 @@ def test_async(self):
172176 else :
173177 assert tab .array .size > 0
174178
179+ @pytest .mark .filterwarnings ('ignore::astropy.io.votable.exceptions.W25' )
175180 def test_async_all (self ):
176181 async_search_all = conesearch .AsyncSearchAll (
177182 SCS_CENTER , SCS_RADIUS , return_astropy_table = False )
0 commit comments