diff options
author | Eric Smith <eric@trueblade.com> | 2010-12-04 13:32:18 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2010-12-04 13:32:18 (GMT) |
commit | f24a0d90a92378ef0904d6bf9695c6b2edcee079 (patch) | |
tree | 3c7fba062834246a25c26b8fb7e714f0c757a5a0 /Lib/test | |
parent | 70099a1555d0f0bbea3553e59746d505c510fafe (diff) | |
download | cpython-f24a0d90a92378ef0904d6bf9695c6b2edcee079.zip cpython-f24a0d90a92378ef0904d6bf9695c6b2edcee079.tar.gz cpython-f24a0d90a92378ef0904d6bf9695c6b2edcee079.tar.bz2 |
Issue #10624: Move requires_IEEE_754 into test.support. I'll fix up other uses of it shortly.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/support.py | 5 | ||||
-rw-r--r-- | Lib/test/test_math.py | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py index 535e2be..a346938 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -366,6 +366,11 @@ def fcmp(x, y): # fuzzy comparison function return (len(x) > len(y)) - (len(x) < len(y)) return (x > y) - (x < y) +# decorator for skipping tests on non-IEEE 754 platforms +requires_IEEE_754 = unittest.skipUnless( + float.__getformat__("double").startswith("IEEE"), + "test requires IEEE 754 doubles") + is_jython = sys.platform.startswith('java') # Filename used for testing diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 2a734fd..c72383a 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -1,7 +1,7 @@ # Python test set -- math module # XXXX Should not do tests around zero only -from test.support import run_unittest, verbose +from test.support import run_unittest, verbose, requires_IEEE_754 import unittest import math import os @@ -15,11 +15,6 @@ NAN = float('nan') INF = float('inf') NINF = float('-inf') -# decorator for skipping tests on non-IEEE 754 platforms -requires_IEEE_754 = unittest.skipUnless( - float.__getformat__("double").startswith("IEEE"), - "test requires IEEE 754 doubles") - # detect evidence of double-rounding: fsum is not always correctly # rounded on machines that suffer from double rounding. x, y = 1e16, 2.9999 # use temporary values to defeat peephole optimizer |