Skip to content

Commit fc1c6bb

Browse files
committed
Add unit test for warning about badly formatted THERM line
1 parent 9fce451 commit fc1c6bb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/rmgpy/chemkinTest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,15 @@ def test_read_thermo_block_temperature_header_columns(self, mock_logging):
166166
for call in mock_logging.warning.call_args_list:
167167
assert "badly formatted" not in call.args[0]
168168

169+
@mock.patch("rmgpy.chemkin.logging")
170+
def test_read_thermo_block_warns_for_badly_formatted_temperature_header(self, mock_logging):
171+
header = "15000000001 9999 5000"
172+
f = io.StringIO("THERM ALL\n" + header + "\nEND\n")
173+
174+
read_thermo_block(f, species_dict={})
175+
176+
assert any("badly formatted" in call.args[0] for call in mock_logging.warning.call_args_list)
177+
169178
def test_read_and_write_and_read_template_reaction_family_for_minimal_example(self):
170179
"""
171180
This example tests if family and templates info can be correctly

0 commit comments

Comments
 (0)