[New-bugs-announce] [issue5780] test_float fails for 'legacy' float repr style
Mark Dickinson
report at bugs.python.org
Fri Apr 17 12:32:54 CEST 2009
New submission from Mark Dickinson <dickinsm at gmail.com>:
After:
CC="gcc -DPY_NO_SHORT_FLOAT_REPR" ./configure && make
test_format_testfile in test_float fails with:
test.support.TestFailed: Traceback (most recent call last):
File "Lib/test/test_float.py", line 341, in test_format_testfile
self.assertEqual(fmt % float(arg), rhs)
AssertionError: '100000000000.0' != '1e+11'
The problem is that for str(float), the new formatting code switches to
exponential notation at 1e11, not 1e12; the legacy code does not.
A similar issue exists for repr: repr(1e16) should now produce '1e+16'.
----------
assignee: marketdickinson
components: Interpreter Core
messages: 86066
nosy: eric.smith, marketdickinson
priority: normal
severity: normal
stage: patch review
status: open
title: test_float fails for 'legacy' float repr style
type: behavior
versions: Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5780>
_______________________________________
More information about the New-bugs-announce
mailing list