Skip to content

Commit 44cc79e

Browse files
committed
ESA hubble tests: no showing messages during non-remote tests
1 parent 3cbd794 commit 44cc79e

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

astroquery/esa/euclid/tests/test_euclidtap.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,25 +160,25 @@ def column_attrs():
160160

161161

162162
def test_load_environments():
163-
tap = EuclidClass(environment='PDR')
163+
tap = EuclidClass(environment='PDR', show_server_messages=False)
164164

165165
assert tap is not None
166166

167-
tap = EuclidClass(environment='IDR')
167+
tap = EuclidClass(environment='IDR', show_server_messages=False)
168168

169169
assert tap is not None
170170

171-
tap = EuclidClass(environment='OTF')
171+
tap = EuclidClass(environment='OTF', show_server_messages=False)
172172

173173
assert tap is not None
174174

175-
tap = EuclidClass(environment='REG')
175+
tap = EuclidClass(environment='REG', show_server_messages=False)
176176

177177
assert tap is not None
178178

179179
environment = 'WRONG'
180180
try:
181-
tap = EuclidClass(environment='WRONG')
181+
tap = EuclidClass(environment='WRONG', show_server_messages=False)
182182
except Exception as e:
183183
assert str(e).startswith(f"Invalid environment {environment}. Valid values: {list(conf.ENVIRONMENTS.keys())}")
184184

@@ -672,7 +672,7 @@ def test_get_product_list_by_tile_index():
672672

673673

674674
def test_get_product_list_errors():
675-
tap = EuclidClass()
675+
tap = EuclidClass(show_server_messages=False)
676676

677677
with pytest.raises(ValueError, match="Missing required argument: 'product_type'"):
678678
tap.get_product_list(observation_id='13', product_type=None)
@@ -1140,7 +1140,7 @@ def test_get_scientific_data_product_list():
11401140

11411141

11421142
def test_get_scientific_data_product_list_exceptions():
1143-
eculid = EuclidClass()
1143+
eculid = EuclidClass(show_server_messages=False)
11441144

11451145
with pytest.raises(ValueError, match="Include a valid parameter to retrieve a LE3 product."):
11461146
eculid.get_scientific_product_list(observation_id=None, tile_index=None, category=None, group=None,

astroquery/esa/hubble/tests/test_esa_hubble_remote.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from astroquery.esa.hubble import ESAHubble
1919
from astropy import coordinates
2020

21+
# don't show messages during test: it creates a remote call
2122
esa_hubble = ESAHubble(show_messages=False)
2223

2324

0 commit comments

Comments
 (0)