Skip to content

Commit 0bfbb66

Browse files
committed
Fix vo_conesearch remote data tests
1 parent 326c23f commit 0bfbb66

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

astroquery/vo_conesearch/tests/test_conesearch.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# ASTROPY
1313
from astropy import units as u
1414
from astropy.coordinates import ICRS, SkyCoord
15+
from astropy.io.votable.exceptions import W25
1516
from astropy.io.votable.tree import Table as VOTable
1617
from astropy.table import Table
1718
from 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)

setup.cfg

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ filterwarnings =
4343
ignore::UserWarning
4444
ignore::astroquery.exceptions.InputWarning
4545
ignore::astropy.utils.exceptions.AstropyDeprecationWarning
46-
ignore::astropy.io.votable.exceptions.W50
47-
ignore::astropy.io.votable.exceptions.W06
4846
ignore::astropy.io.votable.exceptions.W03
47+
ignore::astropy.io.votable.exceptions.W06
4948
ignore::astropy.io.votable.exceptions.W15
50-
ignore::astropy.io.votable.exceptions.W49
5149
ignore::astropy.io.votable.exceptions.W21
50+
ignore::astropy.io.votable.exceptions.W22
5251
ignore::astropy.io.votable.exceptions.W42
52+
ignore::astropy.io.votable.exceptions.W49
53+
ignore::astropy.io.votable.exceptions.W50
54+
ignore::astropy.io.votable.exceptions.W55
5355
ignore:leap-second auto-update failed:astropy.utils.exceptions.AstropyWarning
5456
ignore:numpy.ndarray size changed:RuntimeWarning
5557
ignore:OverflowError converting::astropy

0 commit comments

Comments
 (0)