Skip to content

Commit 00d46d6

Browse files
committed
apparently I sometimes pass strigns instead of numpy bytestrings.
Also, compare sets, not lists
1 parent 537cd70 commit 00d46d6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

astroquery/alma/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ def parse_frequency_support(frequency_support_str):
8989
Quantities representing the frequency range. It will ignore the resolution
9090
and polarizations.
9191
"""
92-
supports = frequency_support_str.tostring().decode('ascii').split('U')
92+
if not isinstance(frequency_support_str, str):
93+
supports = frequency_support_str.tostring().decode('ascii').split('U')
94+
else:
95+
supports = frequency_support_str.split('U')
9396

9497
freq_ranges = [(float(sup[0]),
9598
float(sup[1].split(',')[0].strip(string.ascii_letters))) *

astroquery/lamda/tests/test_lamda_remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ def test_query():
1111
result = lamda.Lamda.query(mol='co')
1212
assert [len(r) for r in result] == [2, 40, 41]
1313
collider_dict = result[0]
14-
assert collider_dict.keys() == ['PH2', 'OH2']
14+
assert set(collider_dict.keys()) == set(['PH2', 'OH2'])
1515
assert [len(collider_dict[r]) for r in collider_dict] == [820, 820]

0 commit comments

Comments
 (0)