diff --git a/interfaces/cython/cantera/solutionbase.pxd b/interfaces/cython/cantera/solutionbase.pxd index bb9f1666c..0842d7f4d 100644 --- a/interfaces/cython/cantera/solutionbase.pxd +++ b/interfaces/cython/cantera/solutionbase.pxd @@ -43,11 +43,11 @@ cdef extern from "cantera/base/Solution.h" namespace "Cantera": void setSource(string) CxxAnyMap& header() except +translate_exception shared_ptr[CxxThermoPhase] thermo() - void setThermo(shared_ptr[CxxThermoPhase]) + void setThermo(shared_ptr[CxxThermoPhase]) except +translate_exception shared_ptr[CxxKinetics] kinetics() - void setKinetics(shared_ptr[CxxKinetics]) + void setKinetics(shared_ptr[CxxKinetics]) except +translate_exception shared_ptr[CxxTransport] transport() - void setTransport(shared_ptr[CxxTransport]) + void setTransport(shared_ptr[CxxTransport]) except +translate_exception void setTransportModel(const string&) except +translate_exception CxxAnyMap parameters(cbool) except +translate_exception size_t nAdjacent() diff --git a/test/python/test_onedim.py b/test/python/test_onedim.py index 08123ef2d..4f5667670 100644 --- a/test/python/test_onedim.py +++ b/test/python/test_onedim.py @@ -142,6 +142,13 @@ class TestOnedim(utilities.CanteraTest): gas.transport_model = 'multicomponent' assert flame.transport_model == 'multicomponent' + with pytest.raises(ct.CanteraError, match="Invalid Transport model"): + flame.transport_model = 'none' + + gas.transport_model = 'unity-Lewis-number' + with pytest.raises(ct.CanteraError, match="Invalid Transport model"): + gas.transport_model = 'none' + class TestFreeFlame(utilities.CanteraTest): tol_ss = [1.0e-5, 1.0e-14] # [rtol atol] for steady-state problem