summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-02-07 20:32:50 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-02-07 20:32:50 (GMT)
commit7b26d7f82f67649a7c72f7bd30bf9248f6f542bc (patch)
treed412428c3f024a1dc9a2ece05442ce3fdd632673
parentee5c885fd2446dea7269c65248312a0856f50fd3 (diff)
downloadcpython-7b26d7f82f67649a7c72f7bd30bf9248f6f542bc.zip
cpython-7b26d7f82f67649a7c72f7bd30bf9248f6f542bc.tar.gz
cpython-7b26d7f82f67649a7c72f7bd30bf9248f6f542bc.tar.bz2
Merged revisions 78099 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78099 | mark.dickinson | 2010-02-07 20:31:10 +0000 (Sun, 07 Feb 2010) | 1 line Skip test_strtod entirely when correctly-rounded string->float isn't implemented ........
-rw-r--r--Lib/test/test_strtod.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_strtod.py b/Lib/test/test_strtod.py
index ab8a7cd..cbda15c 100644
--- a/Lib/test/test_strtod.py
+++ b/Lib/test/test_strtod.py
@@ -8,6 +8,10 @@ import re
import sys
import test.support
+if getattr(sys, 'float_repr_style', '') != 'short':
+ raise unittest.SkipTest('correctly-rounded string->float conversions '
+ 'not available on this system')
+
# Correctly rounded str -> float in pure Python, for comparison.
strtod_parser = re.compile(r""" # A numeric string consists of:
@@ -78,8 +82,6 @@ def strtod(s, mant_dig=53, min_exp = -1021, max_exp = 1024):
TEST_SIZE = 16
-@unittest.skipUnless(getattr(sys, 'float_repr_style', '') == 'short',
- "applies only when using short float repr style")
class StrtodTests(unittest.TestCase):
def check_strtod(self, s):
"""Compare the result of Python's builtin correctly rounded