Skip to content

Commit

Permalink
Fix 0.0 replacement to fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
SabineHaas committed May 23, 2024
1 parent 75e3627 commit 5d79728
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/constraint_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ def compare_lp_files(self, filename, ignored=None, my_om=None):

# sometimes, 0.0 is printed, sometimes 0, harmonise that
exp_diff = [
line + " ".replace(" 0.0 ", " 0 ") for line in exp_diff
line.replace("0.0 ", "0 ").replace("= 0.0", "= 0") for line in exp_diff
]
gen_diff = [
line + " ".replace(" 0.0 ", " 0 ") for line in gen_diff
line.replace("0.0 ", "0 ").replace("= 0.0", "= 0") for line in exp_diff
]

assert len(exp_diff) == len(gen_diff)
Expand Down

0 comments on commit 5d79728

Please sign in to comment.