Skip to content

Commit

Permalink
[thermo] Add unit test for invalid extra SolutionArray column names
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and speth committed Mar 23, 2020
1 parent 506ef6f commit b449e83
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions interfaces/cython/cantera/test/test_thermo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,10 @@ def test_slicing_ndim(self):
self.assertArrayNear(col3.T, 900*np.ones(2))
self.assertArrayNear(row2.T, 900*np.ones(5))

def test_extra(self):
with self.assertRaises(ValueError):
states = ct.SolutionArray(self.gas, extra=['creation_rates'])

def test_append(self):
states = ct.SolutionArray(self.gas, 5)
states.TPX = np.linspace(500, 1000, 5), 2e5, 'H2:0.5, O2:0.4'
Expand Down

0 comments on commit b449e83

Please sign in to comment.