Skip to content

Commit 43ac11b

Browse files
committed
Tests: use np.isclose for Cantera rate conversion tests
1 parent b84df0b commit 43ac11b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/rmgpy/reactionTest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
import cantera as ct
3737
import numpy
38+
import numpy as np
3839
import yaml
3940
from copy import deepcopy
4041

@@ -2916,7 +2917,9 @@ def test_arrhenius(self):
29162917
# Check that the reaction string is the same
29172918
assert repr(converted_obj) == repr(ct_obj)
29182919
# Check that the rate is the same. arrhenius string is not going to be identical
2919-
assert converted_obj.rate.input_data == ct_obj.rate.input_data
2920+
assert np.isclose(converted_obj.rate.input_data['rate-constant']['A'], ct_obj.rate.input_data['rate-constant']['A'])
2921+
assert np.isclose(converted_obj.rate.input_data['rate-constant']['b'], ct_obj.rate.input_data['rate-constant']['b'])
2922+
assert np.isclose(converted_obj.rate.input_data['rate-constant']['Ea'], ct_obj.rate.input_data['rate-constant']['Ea'])
29202923

29212924
def test_multi_arrhenius(self):
29222925
"""

0 commit comments

Comments
 (0)