Skip to content

Commit

Permalink
[UnitTests] Ensure that warnings are properly converted
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Feb 19, 2022
1 parent 90d1cb7 commit 8f2bd17
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions interfaces/cython/cantera/test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@
from cantera._cantera import _py_to_any_to_py


class TestWarnings(utilities.CanteraTest):

def test_user(self):
yaml = """
type: falloff
low-P-rate-constant: {A: 2.3e+12, b: -0.9, Ea: -7112800.0}
high-P-rate-constant: {A: 7.4e+10, b: -0.37, Ea: 0.0}
Troe: {A: 0.7346, T3: 94.0, T1: 1756.0, T2: 0.}
"""

with self.assertWarnsRegex(Warning, "Unexpected parameter value T2=0"):
ct.ReactionRate.from_yaml(yaml)


class TestUnitSystem(utilities.CanteraTest):

def test_default(self):
Expand Down

0 comments on commit 8f2bd17

Please sign in to comment.