mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
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 ........
This commit is contained in:
parent
ee5c885fd2
commit
7b26d7f82f
1 changed files with 4 additions and 2 deletions
|
|
@ -8,6 +8,10 @@ import re
|
||||||
import sys
|
import sys
|
||||||
import test.support
|
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.
|
# Correctly rounded str -> float in pure Python, for comparison.
|
||||||
|
|
||||||
strtod_parser = re.compile(r""" # A numeric string consists of:
|
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
|
TEST_SIZE = 16
|
||||||
|
|
||||||
@unittest.skipUnless(getattr(sys, 'float_repr_style', '') == 'short',
|
|
||||||
"applies only when using short float repr style")
|
|
||||||
class StrtodTests(unittest.TestCase):
|
class StrtodTests(unittest.TestCase):
|
||||||
def check_strtod(self, s):
|
def check_strtod(self, s):
|
||||||
"""Compare the result of Python's builtin correctly rounded
|
"""Compare the result of Python's builtin correctly rounded
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue