Skip to content

Commit 09f6211

Browse files
keflavichbsipocz
authored andcommitted
add another test to improve coverage (remote)
1 parent 3b6adf9 commit 09f6211

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

astroquery/splatalogue/tests/test_splatalogue.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,20 @@ def test_exclude_remote():
127127
chemical_name='Formaldehyde',
128128
exclude='none')
129129
assert len(results) >= 1
130+
131+
132+
@pytest.mark.remote_data
133+
def test_energy_limits():
134+
# first, check that there are high-energy things to exclude
135+
rslt = splatalogue.Splatalogue.query_lines(min_frequency=114 * u.GHz,
136+
max_frequency=116 * u.GHz,
137+
chemical_name=' CO ')
138+
assert rslt['upper_state_energy'].max() > 1000
139+
140+
# then, verify that they are successfully excluded
141+
rslt = splatalogue.Splatalogue.query_lines(min_frequency=114 * u.GHz,
142+
max_frequency=116 * u.GHz,
143+
energy_max=1000,
144+
energy_min=0,
145+
chemical_name=' CO ')
146+
assert rslt['upper_state_energy'].max() < 5

0 commit comments

Comments
 (0)