Skip to content

Commit

Permalink
#1082 loosen tols
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinsulzer committed Jun 29, 2020
1 parent 92678f3 commit 952dc3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/test_solvers/test_casadi_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_model_solver_events(self):
np.testing.assert_array_less(solution.y[0], 1.5)
np.testing.assert_array_less(solution.y[-1], 2.5 + 1e-10)
# test the last entry is exactly 2.5
np.testing.assert_array_almost_equal(solution.y[-1, -1], 2.5, decimal=5)
np.testing.assert_array_almost_equal(solution.y[-1, -1], 2.5, decimal=2)
np.testing.assert_array_almost_equal(
solution.y[0], np.exp(0.1 * solution.t), decimal=5
)
Expand Down Expand Up @@ -171,7 +171,7 @@ def test_model_solver_events(self):
solver = pybamm.CasadiSolver(rtol=1e-8, atol=1e-8)
solution = solver.solve(model, t_eval)
np.testing.assert_array_less(solution.y[0], 1.02 + 1e-10)
np.testing.assert_array_almost_equal(solution.y[0, -1], 1.02)
np.testing.assert_array_almost_equal(solution.y[0, -1], 1.02, decimal=2)

def test_model_step(self):
# Create model
Expand Down

0 comments on commit 952dc3e

Please sign in to comment.