Skip to content

Commit

Permalink
[Thermo] add unit tests for more general state vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingmar Schoegl committed Oct 4, 2019
1 parent 2b940d0 commit dbd2d80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions interfaces/cython/cantera/test/test_purefluid.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ def test_substance_set(self):
self.assertNear(self.water.s, 5000)
self.assertNear(self.water.T, 400)

def test_states(self):
self.assertTrue(self.water._default_state == ('T', 'density'))
self.assertFalse('TPY' in self.water._full_states.values())
self.assertFalse(self.water._partial_states)

def test_set_X(self):
self.water.TX = 500, 0.0
p = self.water.P
Expand Down
5 changes: 5 additions & 0 deletions interfaces/cython/cantera/test/test_thermo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ def setUp(self):
def test_phases(self):
self.assertEqual(self.phase.n_phases, 1)

def test_states(self):
self.assertTrue(self.phase._default_state == ('T', 'density', 'Y'))
self.assertTrue('TPY' in self.phase._full_states.values())
self.assertTrue('TD' in self.phase._partial_states.values())

def test_species(self):
self.assertEqual(self.phase.n_species, 9)
for i,name in enumerate(self.phase.species_names):
Expand Down

0 comments on commit dbd2d80

Please sign in to comment.