New submission from Mark Dickinson <[email protected]>:
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 <[email protected]>
<http://bugs.python.org/issue5780>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com