To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit b9ebe0bc authored by Christoph Goering's avatar Christoph Goering
Browse files

almostEqual bug fix

parent ef271c97
Pipeline #88627 passed with stages
in 4 minutes and 20 seconds
......@@ -76,7 +76,8 @@ class BaseTest(unittest.TestCase):
msg = '\nOne of the values is Zero; the other not\n'
msg += f'val1 : {val1:+.8e}\n'
msg += f'val2 : {val2:+.8e}\n'
self.assertEqual(first=val1, second=val2, msg=msg)
test = abs(val1) < 1e-16 and abs(val2) < 1e-16
self.assertTrue(expr=test, msg=msg)
else:
diff = abs(val1 - val2)
test = diff / val1 < threshold
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment