Skip to content

Commit

Permalink
[Test] Fix coverage consistency issue in getMixDiffCoeffsMass
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Dec 3, 2019
1 parent 3cd1802 commit 80e7ca4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion interfaces/cython/cantera/test/test_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_mixtureAveraged(self):
self.assertArrayNear(Dbin1, Dbin2)
self.assertArrayNear(Dbin1, Dbin1.T)

def test_mixDiffCoeffsMole(self):
def test_mixDiffCoeffsChange(self):
# This test is mainly to make code coverage in GasTransport.cpp
# consistent by always covering the path where the binary diffusion
# coefficients need to be updated
Expand All @@ -55,6 +55,16 @@ def test_mixDiffCoeffsMole(self):
Dkm2 = self.phase.mix_diff_coeffs_mole
self.assertTrue(all(Dkm2 > Dkm1))

Dkm1 = self.phase.mix_diff_coeffs_mass
self.phase.TP = self.phase.T + 1, None
Dkm2 = self.phase.mix_diff_coeffs_mass
self.assertTrue(all(Dkm2 > Dkm1))

Dkm1 = self.phase.mix_diff_coeffs
self.phase.TP = self.phase.T + 1, None
Dkm2 = self.phase.mix_diff_coeffs
self.assertTrue(all(Dkm2 > Dkm1))

def test_CK_mode(self):
mu_ct = self.phase.viscosity
self.phase.transport_model = 'CK_Mix'
Expand Down

0 comments on commit 80e7ca4

Please sign in to comment.