Skip to content

Commit

Permalink
Switch test to triggered event
Browse files Browse the repository at this point in the history
  • Loading branch information
pipliggins committed Sep 20, 2024
1 parent cee2cad commit b012684
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/unit/test_solvers/test_idaklu_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

0 comments on commit b012684

Please sign in to comment.