]> granicus.if.org Git - python/commitdiff
Merged revisions 75157 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Wed, 30 Sep 2009 17:47:54 +0000 (17:47 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Wed, 30 Sep 2009 17:47:54 +0000 (17:47 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75157 | mark.dickinson | 2009-09-30 17:58:01 +0100 (Wed, 30 Sep 2009) | 1 line

  Fix buggy accuracy test
........

Lib/test/test_math.py

index f29bddd8dec5eda484fda35a8b55113f1009375d..6d06fef4cdf99a5c697408a8cd5e3449ee5dbd34 100644 (file)
@@ -955,7 +955,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):