def test_dens_mol_phase(m): assert value(Cubic.dens_mol_phase(m.props[1], "Vap")) == pytest.approx(44.800, rel=1e-3) assert value(Cubic.dens_mol_phase(m.props[1], "Liq")) == pytest.approx(41.157, rel=1e-3)
def test_dens_mol_phase_invalid_phase(m_sol): with pytest.raises(PropertyNotSupportedError): Cubic.dens_mol_phase(m_sol.props[1], "Sol")