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

Method test_convert_to_default

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

Source from the content-addressed store, hash-verified

64 ct.UnitSystem({"current": "2 A"})
65
66 def test_convert_to_default(self):
67 system = ct.UnitSystem()
68 assert system.convert_to("3 cm", "m") == 0.03
69 assert system.convert_to(4, "mm") == 4000.0
70 assert system.convert_to("3 cm", ct.Units("m")) == 0.03
71 assert system.convert_to(4, ct.Units("m")) == 4
72
73 def test_convert_activation_energy(self):
74 system = ct.UnitSystem()

Callers

nothing calls this directly

Calls 2

UnitsMethod · 0.80
UnitSystemMethod · 0.45

Tested by

no test coverage detected