summaryrefslogtreecommitdiffstats
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-05-01 11:42:00 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-05-01 11:42:00 (GMT)
commitf489caf5daa2b0f3a1bd951b585c834aab1a54c6 (patch)
treef57e0339acc0f5b702743d438738ad2f0d2aeba7 /Lib/test/string_tests.py
parentfb526ac34af13116733fcd0a306016e253d90c08 (diff)
downloadcpython-f489caf5daa2b0f3a1bd951b585c834aab1a54c6.zip
cpython-f489caf5daa2b0f3a1bd951b585c834aab1a54c6.tar.gz
cpython-f489caf5daa2b0f3a1bd951b585c834aab1a54c6.tar.bz2
Issue #5859: Remove use of fixed-length buffers for float formatting
in unicodeobject.c and the fallback version of PyOS_double_to_string. As a result, operations like '%.120e' % 12.34 no longer raise an exception.
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r--Lib/test/string_tests.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index 2a58e58..1637efb 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -1105,14 +1105,7 @@ class MixinStrUnicodeUserStringTest:
value = 0.01
for x in range(60):
value = value * 3.141592655 / 3.0 * 10.0
- # The formatfloat() code in stringobject.c and
- # unicodeobject.c uses a 120 byte buffer and switches from
- # 'f' formatting to 'g' at precision 50, so we expect
- # OverflowErrors for the ranges x < 50 and prec >= 67.
- if x < 50 and prec >= 67:
- self.checkraises(OverflowError, format, "__mod__", value)
- else:
- self.checkcall(format, "__mod__", value)
+ self.checkcall(format, "__mod__", value)
def test_inplace_rewrites(self):
# Check that strings don't copy and modify cached single-character strings