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

Method test_raises

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

Source from the content-addressed store, hash-verified

58 assert units["activation-energy"] == "K"
59
60 def test_raises(self):
61 with pytest.raises(ct.CanteraError, match="non-unity conversion factor"):
62 ct.UnitSystem({"temperature": "2 K"})
63 with pytest.raises(ct.CanteraError, match="non-unity conversion factor"):
64 ct.UnitSystem({"current": "2 A"})
65
66 def test_convert_to_default(self):
67 system = ct.UnitSystem()

Callers

nothing calls this directly

Calls 1

UnitSystemMethod · 0.45

Tested by

no test coverage detected