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

Method test_append_state

test/python/test_composite.py:483–494  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

481 assert list(states[100:102].index) == [] # outside of range
482
483 def test_append_state(self):
484 gas = ct.Solution("h2o2.yaml")
485 gas.TPX = 300, ct.one_atm, 'H2:0.5, O2:0.4'
486 states = ct.SolutionArray(gas)
487 states.append(gas.state)
488 assert states[0].T == gas.T
489 assert states[0].P == gas.P
490 assert states[0].X == approx(gas.X)
491 assert len(states) == 1
492 assert states.shape == (1,)
493 assert states.ndim == 1
494 assert states.size == 1
495
496 def test_append_no_norm_data(self):
497 gas = ct.Solution("h2o2.yaml")

Callers

nothing calls this directly

Calls 4

appendMethod · 0.95
lenFunction · 0.85
SolutionMethod · 0.80
SolutionArrayMethod · 0.80

Tested by

no test coverage detected