Skip to content

Commit 21b3a7f

Browse files
committed
directly test attributes rather than the repr
1 parent ab15a7b commit 21b3a7f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

test/rmgpy/reactionTest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3035,8 +3035,12 @@ def test_falloff(self):
30353035
ct_lindemann = self.lindemann.to_cantera(self.species_list, use_chemkin_identifier=True)
30363036
assert type(ct_lindemann.rate) == type(self.ct_lindemann.rate)
30373037
assert ct_lindemann.third_body.efficiencies == self.ct_lindemann.third_body.efficiencies
3038-
assert str(ct_lindemann.rate.low_rate) == str(self.ct_lindemann.rate.low_rate)
3039-
assert str(ct_lindemann.rate.high_rate) == str(self.ct_lindemann.rate.high_rate)
3038+
assert round(abs(ct_lindemann.rate.low_rate.activation_energy - self.ct_lindemann.rate.low_rate.activation_energy), 3) == 0
3039+
assert round(abs(ct_lindemann.rate.low_rate.pre_exponential_factor - self.ct_lindemann.rate.low_rate.pre_exponential_factor), 3) == 0
3040+
assert round(abs(ct_lindemann.rate.low_rate.temperature_exponent - self.ct_lindemann.rate.low_rate.temperature_exponent), 3) == 0
3041+
assert round(abs(ct_lindemann.rate.high_rate.activation_energy - self.ct_lindemann.rate.high_rate.activation_energy), 3) == 0
3042+
assert round(abs(ct_lindemann.rate.high_rate.pre_exponential_factor - self.ct_lindemann.rate.high_rate.pre_exponential_factor), 3) == 0
3043+
assert round(abs(ct_lindemann.rate.high_rate.temperature_exponent - self.ct_lindemann.rate.high_rate.temperature_exponent), 3) == 0
30403044

30413045

30423046
class TestChargeTransferReaction:

0 commit comments

Comments
 (0)