Skip to content

Commit

Permalink
fix: make test order independent
Browse files Browse the repository at this point in the history
  • Loading branch information
Midnighter authored and hredestig committed Apr 20, 2017
1 parent 7fadcab commit 0b56e07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cobra/test/test_solver_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ def test_transfer_objective(self, model):
new_mod = Model("new model")
new_mod.add_reactions(model.reactions)
new_mod.objective = model.objective
assert (str(new_mod.objective.expression) ==
str(model.objective.expression))
assert (set(str(x) for x in model.objective.expression.args) == set(
str(x) for x in new_mod.objective.expression.args))
new_mod.solver.optimize()
assert abs(new_mod.objective.value - 0.874) < 0.001

Expand Down

0 comments on commit 0b56e07

Please sign in to comment.