diff --git a/tests/constraint_tests.py b/tests/constraint_tests.py index dc7e38447..28edc01bf 100644 --- a/tests/constraint_tests.py +++ b/tests/constraint_tests.py @@ -78,10 +78,12 @@ 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 ").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 ").replace("= 0.0", "= 0") for line in exp_diff + line.replace("0.0 ", "0 ").replace("= 0.0", "= 0") + for line in exp_diff ] assert len(exp_diff) == len(gen_diff)