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

Method test_extra_not_empty

test/python/test_thermo.py:2225–2232  ·  view source on GitHub ↗

Test that a non-empty SolutionArray raises a ValueError if initial values for properties are not supplied.

(self)

Source from the content-addressed store, hash-verified

2223 assert states.prop == approx(np.array(((3, 3), (3, 3))))
2224
2225 def test_extra_not_empty(self):
2226 """Test that a non-empty SolutionArray raises a ValueError if
2227 initial values for properties are not supplied.
2228 """
2229 with pytest.raises(ValueError, match="Initial values for extra components"):
2230 ct.SolutionArray(self.gas, 3, extra=["prop"])
2231 with pytest.raises(ValueError, match="Initial values for extra components"):
2232 ct.SolutionArray(self.gas, 3, extra=np.array(["prop", "prop2"]))
2233
2234 def test_extra_create_multidim(self):
2235 # requires matching first dimensions

Callers

nothing calls this directly

Calls 1

SolutionArrayMethod · 0.80

Tested by

no test coverage detected