To receive notifications about scheduled maintenance, please subscribe to the mailing-list You can subscribe to the mailing-list at

Commit 59a870ff authored by Jonas Fankhauser's avatar Jonas Fankhauser
Browse files

Merge branch 'bug/BaseTest' into 'developer'

almostEqual bug fix

See merge request !56
parents ef271c97 b9ebe0bc
Pipeline #88893 passed with stages
in 4 minutes and 18 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)
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