From 5d79728423fa41e15ab81d8d054c84605ed3f1fd Mon Sep 17 00:00:00 2001 From: SabineHaas Date: Thu, 23 May 2024 10:10:05 +0200 Subject: [PATCH] Fix 0.0 replacement to fix test --- tests/constraint_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/constraint_tests.py b/tests/constraint_tests.py index 53a35936e..d3a462922 100644 --- a/tests/constraint_tests.py +++ b/tests/constraint_tests.py @@ -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)