From ba988f579c3934a4a00e6d3880c1d786a9e2599d Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 10 Jul 2024 10:54:00 +0200 Subject: [PATCH] .. --- python/tests/test_swig_interface.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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)