Skip to content

Commit

Permalink
Update test_units.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hallaali committed Mar 22, 2021
1 parent 92b8450 commit b482f4f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions interfaces/cython/cantera/test/test_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def test_dimensions(self):
#basis-independent
dims_T = self.phase.T.dimensionality
self.assertIn("[temperature]", dims_T)
self.assertEqual(dims_T"[temperature]"], 1.0)
self.assertEqual(dims_T["[temperature]"], 1.0)
dims_P = self.phase.P.dimensionality
self.assertIn("[pressure]", dims_P)
self.assertEqual(dims_P["[pressure]", 1.0)
self.assertEqual(dims_P["[pressure]"], 1.0)
dims_X = self.phase.X.dimensionality
self.assertIn("[dimensionless]", dims_X)
self.assertEqual(dims_X["[dimensionless]"], 1.0)
Expand All @@ -56,7 +56,7 @@ def test_dimensions(self):
self.assertEqual(dims_T_sat["[temperature]"], 1.0)
dims_P_sat = self.phase.P_sat.dimensionality
self.assertIn("[pressure]", dims_P_sat)
self.assertEqual(dims_P_sat["[pressure]", 1.0)
self.assertEqual(dims_P_sat["[pressure]"], 1.0)
dims_atomic_weight = self.phase.atomic_weight.dimensionality
self.assertIn("[mass/molar]", dims_atomic_weight)
self.assertEqual(dims_atomic_weight["[mass]"], 1.0)
Expand All @@ -74,7 +74,7 @@ def test_dimensions(self):
self.assertEqual(dims_critical_temperature["[temperature]"], 1.0)
dims_critical_pressure = self.phase.critical_pressure.dimensionality
self.assertIn("[pressure]", dims_critical_pressure)
self.assertEqual(dims_critical_pressure["[pressure]", 1.0)
self.assertEqual(dims_critical_pressure["[pressure]"], 1.0)
dims_electric_potential = self.phase.electric_potential.dimensionality
self.assertIn("[volts]", dims_electric_potential)
self.assertEqual(dims_electric_potential["[volts]"], 1.0)
Expand All @@ -84,7 +84,7 @@ def test_dimensions(self):
self.assertEqual(dims_electrochemical_potentials["[molar]"], -1.0)
dims_isothermal_compressibility = self.phase.isothermal_compressibility.dimensionality
self.assertIn("[1/pressure]", dims_isothermal_compressibility)
self.assertEqual(dims_isothermal_compressibility["[pressure]", -1.0)
self.assertEqual(dims_isothermal_compressibility["[pressure]"], -1.0)
dims_max_temp = self.phase.max_temp.dimensionality
self.assertIn("[temperature]", dims_max_temp)
self.assertEqual(dims_max_temp["[temperature]"], 1.0)
Expand Down Expand Up @@ -124,7 +124,7 @@ def test_dimensions(self):
self.assertEqual(dims_partial_molar_volumes["[molar]"], -1.0)
dims_reference_pressure = self.phase.reference_pressure.dimensionality
self.assertIn("[pressure]", dims_reference_pressure)
self.assertEqual(dims_reference_pressure["[pressure]", 1.0)
self.assertEqual(dims_reference_pressure["[pressure]"], 1.0)
dims_thermal_expansion_coeff = self.phase.thermal_expansion_coeff.dimensionality
self.assertIn("[1/temperature]", dims_thermal_expansion_coeff)
self.assertEqual(dims_thermal_expansion_coeff["[temperature]"], -1.0)
Expand Down

0 comments on commit b482f4f

Please sign in to comment.