diff --git a/python/tests/test_swig_interface.py b/python/tests/test_swig_interface.py index cf4371339d..33ed50ea50 100644 --- a/python/tests/test_swig_interface.py +++ b/python/tests/test_swig_interface.py @@ -567,3 +567,12 @@ def test_python_exceptions(sbml_example_presimulation_module): model.setTimepoints([1]) rdata = amici.runAmiciSimulation(model, solver) assert rdata.status == amici.AMICI_FIRST_RHSFUNC_ERR + + # model throws, base catches, swig-exception handling is involved + from amici._amici import runAmiciSimulation + + with pytest.raises( + RuntimeError, match="AMICI failed to integrate the forward problem" + ): + # rethrow=True + runAmiciSimulation(solver, None, model.get(), True)