Skip to content

Commit

Permalink
tol
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Dec 19, 2023
1 parent c4ca25c commit e022d1a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions python/tests/test_preequilibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
import pytest
from amici.debugging import get_model_for_preeq
from numpy.testing import assert_allclose
from numpy.testing import assert_allclose, assert_equal
from test_pysb import get_data


Expand Down Expand Up @@ -651,17 +651,14 @@ def test_get_model_for_preeq(preeq_fixture):
amici.SteadyStateSensitivityMode.integrationOnly
)
model_preeq = get_model_for_preeq(model, edata)
# the exactly same settings are used, so results should match exactly
rdata1 = amici.runAmiciSimulation(model_preeq, solver)
rdata2 = amici.runAmiciSimulation(model, solver, edata_preeq)
assert_allclose(
assert_equal(
rdata1.x,
rdata2.x,
atol=solver.getAbsoluteTolerance(),
rtol=solver.getRelativeTolerance(),
)
assert_allclose(
assert_equal(
rdata1.sx,
rdata2.sx,
atol=solver.getAbsoluteTolerance(),
rtol=solver.getRelativeTolerance(),
)

0 comments on commit e022d1a

Please sign in to comment.