MCPcopy Create free account
hub / github.com/Cantera/cantera / test_convert_to_custom

Method test_convert_to_custom

test/python/test_utils.py:83–86  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81 assert system.convert_rate_coeff_to("22 m^3/mol/s", "m^3/kmol/s") == approx(22e3)
82
83 def test_convert_to_custom(self):
84 system = ct.UnitSystem({"length": "cm", "mass": "g"})
85 assert system.convert_to(10000, "m^2") == 1.0
86 assert system.convert_to(500, "kg") == 0.5
87
88 def test_convert_to_array(self):
89 system = ct.UnitSystem({"length": "km"})

Callers

nothing calls this directly

Calls 1

UnitSystemMethod · 0.45

Tested by

no test coverage detected