From 6de1ef927cdc0ed347412b2cdbe9e50ce1139f51 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 26 Nov 2024 12:23:48 +0100 Subject: [PATCH] _py --- python/tests/test_observable_events.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/python/tests/test_observable_events.py b/python/tests/test_observable_events.py index 2887308ff6..db6fc3d452 100644 --- a/python/tests/test_observable_events.py +++ b/python/tests/test_observable_events.py @@ -149,8 +149,8 @@ def model_events_def(): models = [ - (model_neuron_def, "model_neuron", ["v0", "I0"]), - (model_events_def, "model_events", ["k1", "k2", "k3", "k4"]), + (model_neuron_def, "model_neuron_py", ["v0", "I0"]), + (model_events_def, "model_events_py", ["k1", "k2", "k3", "k4"]), ] @@ -197,6 +197,10 @@ def run_test_cases(model): solver = model.getSolver() model_name = model.getName() + # we need a different name for the model module to avoid collisions + # with the matlab-pregenerated models, but we need the old name for + # the expected results + model_name = model_name.removesuffix("_py") for case in list(expected_results[model_name].keys()): if case.startswith("sensi2"): @@ -210,7 +214,7 @@ def run_test_cases(model): ) edata = None - if "data" in expected_results[model.getName()][case].keys(): + if "data" in expected_results[model_name][case].keys(): edata = amici.readSimulationExpData( str(expected_results_file), f"/{model_name}/{case}/data", @@ -226,6 +230,6 @@ def run_test_cases(model): verify_simulation_results( rdata, - expected_results[model.getName()][case]["results"], + expected_results[model_name][case]["results"], **verify_simulation_opts, )