From b01268462a7b0453817819137c01e9acfa5fcf9e Mon Sep 17 00:00:00 2001 From: Pip Liggins Date: Thu, 19 Sep 2024 17:16:35 -0700 Subject: [PATCH] Switch test to triggered event --- tests/unit/test_solvers/test_idaklu_solver.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_solvers/test_idaklu_solver.py b/tests/unit/test_solvers/test_idaklu_solver.py index 045c7b6aec..b049729ae3 100644 --- a/tests/unit/test_solvers/test_idaklu_solver.py +++ b/tests/unit/test_solvers/test_idaklu_solver.py @@ -1173,12 +1173,13 @@ def test_extrapolation_events_with_output_variables(self): model.initial_conditions = {v: 1, c: 2} model.events.append( pybamm.Event( - "Ignored event", - v + 10, + "Triggered event", + v - 0.5, pybamm.EventType.INTERPOLANT_EXTRAPOLATION, ) ) solver = pybamm.IDAKLUSolver(output_variables=["c"]) solver.set_up(model) - solver.solve(model, t_eval=[0, 1]) + with pytest.warns(pybamm.SolverWarning, match="extrapolation occurred for"): + solver.solve(model, t_eval=[0, 1])