12
12
# ASTROPY
13
13
from astropy import units as u
14
14
from astropy .coordinates import ICRS , SkyCoord
15
+ from astropy .io .votable .exceptions import W25
15
16
from astropy .io .votable .tree import Table as VOTable
16
17
from astropy .table import Table
17
18
from astropy .utils .data import get_pkg_data_filename
@@ -81,6 +82,7 @@ def test_no_result_astroquery(self):
81
82
service_url = self .url )
82
83
assert result is None
83
84
85
+ @pytest .mark .filterwarnings ('ignore::astropy.io.votable.exceptions.W25' )
84
86
@pytest .mark .parametrize (('center' , 'radius' ),
85
87
[((SCS_RA , SCS_DEC ), SCS_SR ),
86
88
(SCS_CENTER , SCS_RADIUS )])
@@ -113,7 +115,7 @@ def test_sky_coord_classic(self):
113
115
114
116
def test_timeout_classic (self ):
115
117
"""Test timed out query."""
116
- with pytest .warns (NoResultsWarning , match = 'timed out' ):
118
+ with pytest .warns (W25 , match = 'timed out' ):
117
119
with conf .set_temp ('timeout' , 1e-6 ):
118
120
result = conesearch .conesearch (
119
121
SCS_CENTER , SCS_RADIUS , cache = False ,
@@ -142,6 +144,7 @@ def test_searches_classic(self):
142
144
assert tab_2 .url == tab_4 .url
143
145
np .testing .assert_array_equal (tab_2 .array , tab_4 .array )
144
146
147
+ @pytest .mark .filterwarnings ('ignore::astropy.io.votable.exceptions.W25' )
145
148
@pytest .mark .parametrize (('center' , 'radius' ),
146
149
[((SCS_RA , SCS_DEC ), SCS_SR ),
147
150
(SCS_CENTER , SCS_RADIUS )])
@@ -156,6 +159,7 @@ def test_search_all(self, center, radius):
156
159
157
160
assert tab_1 .array .size > 0
158
161
162
+ @pytest .mark .filterwarnings ('ignore::astropy.io.votable.exceptions.W25' )
159
163
def test_async (self ):
160
164
async_search = conesearch .AsyncConeSearch (
161
165
SCS_CENTER , SCS_RADIUS , return_astropy_table = False )
@@ -172,6 +176,7 @@ def test_async(self):
172
176
else :
173
177
assert tab .array .size > 0
174
178
179
+ @pytest .mark .filterwarnings ('ignore::astropy.io.votable.exceptions.W25' )
175
180
def test_async_all (self ):
176
181
async_search_all = conesearch .AsyncSearchAll (
177
182
SCS_CENTER , SCS_RADIUS , return_astropy_table = False )
0 commit comments