Skip to content

Commit

Permalink
[UnitTests] Add unit test for propagated SolutionArray 'extra'
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Feb 25, 2022
1 parent d411f6c commit 3edbacd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions interfaces/cython/cantera/test/test_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ def test_collect_data(self):
self.assertIn('X', collected)
self.assertEqual(collected['X'].shape, (0, self.gas.n_species))

def test_getitem(self):
states = ct.SolutionArray(self.gas, 10, extra={"index": range(10)})
for ix, state in enumerate(states):
assert state.index == ix

def test_append_state(self):
gas = ct.Solution("h2o2.yaml")
gas.TPX = 300, ct.one_atm, 'H2:0.5, O2:0.4'
Expand Down

0 comments on commit 3edbacd

Please sign in to comment.