Skip to content

Commit 176d128

Browse files
committed
Don't change expected Exceptions in tests
1 parent 1e7c008 commit 176d128

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

astroquery/hips2fits/tests/test_hips2fits_remote.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import pytest
55
from astropy import wcs as astropy_wcs
66
from astropy.io import fits
7-
from astropy.utils.exceptions import AstropyUserWarning
87
import numpy as np
98
from matplotlib.colors import Colormap
109

@@ -83,7 +82,7 @@ def test_query_jpg_no_wcs(self):
8382
assert isinstance(result, np.ndarray) and result.shape[2] == 3
8483

8584
def test_bad_strech(self):
86-
with pytest.raises(AttributeError, match=r"Unknown value azs for stretch parameter"):
85+
with pytest.raises(AttributeError):
8786
hips2fits.query_with_wcs(
8887
hips=self.hips,
8988
wcs=self.w,

astroquery/vizier/tests/test_vizier_remote.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from astroquery import vizier
88
from astroquery.utils import commons
9-
from astroquery.exceptions import TableParseError
109

1110

1211
@pytest.mark.remote_data
@@ -124,9 +123,8 @@ def test_multicoord(self):
124123

125124
def test_findcatalog_maxcatalog(self):
126125
V = vizier.core.Vizier()
127-
with pytest.raises(TableParseError, match=r"Failed to parse VIZIER result"):
128-
cats = V.find_catalogs('eclipsing binary', max_catalogs=5000)
129-
assert len(cats) >= 468
126+
cats = V.find_catalogs('eclipsing binary', max_catalogs=5000)
127+
assert len(cats) >= 468
130128

131129
# with pytest.raises(ValueError) as exc:
132130
# V.find_catalogs('eclipsing binary')
@@ -137,10 +135,9 @@ def test_findcatalog_maxcatalog(self):
137135
def test_findcatalog_ucd(self):
138136
V = vizier.core.Vizier()
139137
ucdresult = V(ucd='time.age*').find_catalogs('eclipsing binary', max_catalogs=5000)
140-
with pytest.raises(TableParseError, match=r"Failed to parse VIZIER result"):
141-
result = V.find_catalogs('eclipsing binary', max_catalogs=5000)
138+
result = V.find_catalogs('eclipsing binary', max_catalogs=5000)
142139

143-
assert len(ucdresult) >= 12 # count as of 1/15/2018
144-
assert len(result) >= 628
145-
# important part: we're testing that UCD is parsed and some catalogs are ruled out
146-
assert len(ucdresult) < len(result)
140+
assert len(ucdresult) >= 12 # count as of 1/15/2018
141+
assert len(result) >= 628
142+
# important part: we're testing that UCD is parsed and some catalogs are ruled out
143+
assert len(ucdresult) < len(result)

0 commit comments

Comments
 (0)