Skip to content

Commit 8f4cd91

Browse files
authored
Applying code review comments
The test will need a bit more tweaking, I'll do that in a follow-up.
1 parent 6c89b3a commit 8f4cd91

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

astroquery/esa/euclid/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ def get_spectrum(self, *, source_id, schema='sedm', retrieval_type="ALL", output
11881188

11891189
rt = str(retrieval_type).upper()
11901190
if rt != 'ALL' and rt not in self.__VALID_DATALINK_RETRIEVAL_TYPES:
1191-
raise ValueError(f"Invalid mandatory argument 'retrieval_type'. Found {retrieval_type}, "
1191+
raise ValueError(f"Invalid argument value for 'retrieval_type'. Found {retrieval_type}, "
11921192
f"expected: 'ALL' or any of {self.__VALID_DATALINK_RETRIEVAL_TYPES}")
11931193

11941194
params_dict = {}

astroquery/esa/euclid/tests/test_euclidtap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ def test_get_spectrum_exceptions():
10841084

10851085
assert str(exc_info.value).startswith('Missing required argument')
10861086

1087-
with pytest.raises(Exception) as exc_info:
1087+
with pytest.raises(ValueError) as exc_info:
10881088
tap.get_spectrum(retrieval_type='hola', source_id='2417660845403252054', schema='schema', output_file=None)
10891089

10901090
assert str(exc_info.value).startswith(

docs/esa/euclid/euclid.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ The following example shows how to retrieve the DataLink products (1D Spectra) a
12301230

12311231
>>> files = Euclid.get_spectrum(retrieval_type='SPECTRA_BGS', source_id='2675005060662306333')
12321232
>>> from astropy.io import fits
1233-
>>> print(fits.info(files[0]))
1233+
>>> print(fits.info(files[0])) # doctest: +IGNORE_OUTPUT
12341234
Filename: /home/astroquery/temp_20250225_204959/2675005060662306333.fits
12351235
No. Name Ver Type Cards Dimensions Format
12361236
0 PRIMARY 1 PrimaryHDU 4 ()

0 commit comments

Comments
 (0)