diff --git a/python/test_gumath.py b/python/test_gumath.py index 018334b..35fe66d 100644 --- a/python/test_gumath.py +++ b/python/test_gumath.py @@ -997,8 +997,9 @@ def assertRelErrorLess(self, calc, expected, maxerr, msg): return elif cmath.isinf(calc) or cmath.isinf(expected): return - elif abs(expected) < 1e-5 and abs(calc) < 1e-5: - return + elif abs(expected) < 1e-5 or abs(calc) < 1e-5: + self.assertLess(abs(calc), 1e-5, msg) + self.assertLess(abs(expected), 1e-5, msg) else: err = abs((calc-expected) / expected) self.assertLess(err, maxerr, msg)