Skip to content

Commit c7c5837

Browse files
committed
ESA hubble tests: no showing messages during non-remote tests
1 parent d997058 commit c7c5837

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

astroquery/esa/euclid/tests/test_euclidtap.py

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

126126

127127
def test_load_environments():
128-
tap = EuclidClass(environment='PDR')
128+
tap = EuclidClass(environment='PDR', show_server_messages=False)
129129

130130
assert tap is not None
131131

132-
tap = EuclidClass(environment='IDR')
132+
tap = EuclidClass(environment='IDR', show_server_messages=False)
133133

134134
assert tap is not None
135135

136-
tap = EuclidClass(environment='OTF')
136+
tap = EuclidClass(environment='OTF', show_server_messages=False)
137137

138138
assert tap is not None
139139

140-
tap = EuclidClass(environment='REG')
140+
tap = EuclidClass(environment='REG', show_server_messages=False)
141141

142142
assert tap is not None
143143

144144
environment = 'WRONG'
145145
try:
146-
tap = EuclidClass(environment='WRONG')
146+
tap = EuclidClass(environment='WRONG', show_server_messages=False)
147147
except Exception as e:
148148
assert str(e).startswith(f"Invalid environment {environment}. Valid values: {list(conf.ENVIRONMENTS.keys())}")
149149

@@ -637,7 +637,7 @@ def test_get_product_list_by_tile_index():
637637

638638

639639
def test_get_product_list_errors():
640-
tap = EuclidClass()
640+
tap = EuclidClass(show_server_messages=False)
641641

642642
with pytest.raises(ValueError, match="Missing required argument: 'product_type'"):
643643
tap.get_product_list(observation_id='13', product_type=None)
@@ -1105,7 +1105,7 @@ def test_get_scientific_data_product_list():
11051105

11061106

11071107
def test_get_scientific_data_product_list_exceptions():
1108-
eculid = EuclidClass()
1108+
eculid = EuclidClass(show_server_messages=False)
11091109

11101110
with pytest.raises(ValueError, match="Include a valid parameter to retrieve a LE3 product."):
11111111
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
from astroquery.esa.hubble import ESAHubble
1919
from astropy import coordinates
2020

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

2324

2425
def data_path(filename):

0 commit comments

Comments
 (0)