From: Mark Dickinson Date: Wed, 30 Sep 2009 16:58:01 +0000 (+0000) Subject: Fix buggy accuracy test X-Git-Tag: v2.7a1~436 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ca7482cc93946e88ae09e16d076f5e556f2e701;p=python Fix buggy accuracy test --- diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 8486b0bd86..2f45a1ea3c 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -958,7 +958,7 @@ class MathTests(unittest.TestCase): continue if not math.isnan(expected) and not math.isnan(got): diff_ulps = to_ulps(expected) - to_ulps(got) - if diff_ulps <= ALLOWED_ERROR: + if abs(diff_ulps) <= ALLOWED_ERROR: continue if isinstance(got, str) and isinstance(expected, str):