Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finish test
Browse files Browse the repository at this point in the history
keflavich committed Jan 17, 2025
1 parent c369e90 commit a4b0843
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion astroquery/linelists/cdms/tests/test_cdms.py
Original file line number Diff line number Diff line change
@@ -173,8 +173,30 @@ def test_lut_multitable():
# Regression test for the different names used in the partition table and the other tables
lut = build_lookup()

lut.find('C2H5OCHO', 0)
assert lut.find('ethyl formate', 0)['ethyl formate'] == 74514
assert lut.find('C2H5OCHO', 0)['C2H5OCHO'] == 74514
assert lut.find('C2H4O', 0)['c-C2H4O'] == 44504
assert lut.find('Ethylene oxide', 0)['Ethylene oxide'] == 44504


def test_lut_literal():
# regression for 2901
lut = build_lookup()

hcop = lut.find('HCO+', 0)
assert len(hcop) >= 16

hcopv0 = lut.find('HCO+, v=0', 0)
assert len(hcopv0) == 1
assert hcopv0['HCO+, v=0'] == 29507

# two spacings exist in the tables
hcopv0 = lut.find('HCO+, v = 0', 0)
assert len(hcopv0) == 1
assert hcopv0['HCO+, v = 0'] == 29507

thirteenco = lut.find('13CO', 0)
assert len(thirteenco) == 1
assert thirteenco['13CO'] == 29501
thirteencostar = lut.find('13CO*', 0)
assert len(thirteencostar) >= 252

0 comments on commit a4b0843

Please sign in to comment.