Skip to content

Commit

Permalink
fix: make the sample test future proof
Browse files Browse the repository at this point in the history
* Fix #766
  • Loading branch information
Midnighter committed Sep 26, 2018
1 parent 3b39e7b commit 43d6835
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cobra/test/test_flux_analysis/test_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ def test_validate_wrong_sample(achr, model):

def test_fixed_seed(model):
"""Test result of fixed seed for sampling."""
s = sample(model, 1, seed=42)
assert np.allclose(s.TPI[0], 9.12037487)
s1 = sample(model, 1, seed=42)
s2 = sample(model, 1, seed=42)
assert np.isclose(s1.TPI[0], s2.TPI[0])


def test_equality_constraint(model):
Expand Down

0 comments on commit 43d6835

Please sign in to comment.