Skip to content

Commit 0f1dafc

Browse files
Fix tests due to longer default simulation times
1 parent 7db8feb commit 0f1dafc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

overreact/simulate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ def get_y(
9595
used to produce a suitable vector of timepoints for, e.g., plotting:
9696
9797
>>> y.t_min, y.t_max
98-
(0.0, 14.0)
98+
(0.0, 103.0)
9999
>>> t = np.linspace(y.t_min, y.t_max)
100100
>>> t
101-
array([ 0. , 0.28571429, ..., 13.71428571, 14. ])
101+
array([ 0. , 2.10204082, ..., 100.89795918, 103. ])
102102
103103
Both `y` and `r` can be used to check concentrations and rates in any
104104
point in time. In particular, both are vectorized:

tests/test_simulate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_get_y_propagates_reaction_automatically():
4444
y, r = simulate.get_y(simulate.get_dydt(scheme, np.array([1.0, 1.0])), y0=y0)
4545

4646
assert y.t_min == 0.0
47-
assert y.t_max == 1400.0
47+
assert y.t_max == 10300.0
4848
assert y(y.t_min) == pytest.approx(y0)
4949
assert y(y.t_max) == pytest.approx(
5050
[1.668212890625, 0.6728515625, 0.341787109375], 9e-5
@@ -90,7 +90,7 @@ def test_get_y_conservation_in_equilibria():
9090
t = np.linspace(y.t_min, y.t_max, num=100)
9191

9292
assert y.t_min == 0.0
93-
assert y.t_max == 14.0
93+
assert y.t_max == 103.0
9494
assert y(y.t_min) == pytest.approx(y0)
9595
assert y(y.t_max) == pytest.approx([0.5, 0.5], 5e-5)
9696
assert r(y.t_min) == pytest.approx([-1, 1])

0 commit comments

Comments
 (0)