From: Guido van Rossum Date: Mon, 3 Feb 2003 15:25:01 +0000 (+0000) Subject: test_float_overflow(): make shuge (added last week) a little less X-Git-Tag: v2.3c1~2083 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7aa56c9a7f3b23fa5634ae62ae881a0c94f21ab6;p=python test_float_overflow(): make shuge (added last week) a little less huge. On older Linux systems, the C library's strtod() apparently gives up before seeing the end of the string when it sees so many digits that it thinks the result must be Infinity. (It is wrong, BTW -- there could be an "e-10000" hiding behind 10,000 digits.) The shorter shuge still tests what it's testing, without relying on strtod() doing a super job. --- diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py index 9eb063c30b..cbb0b37d91 100644 --- a/Lib/test/test_long.py +++ b/Lib/test/test_long.py @@ -371,7 +371,7 @@ def test_float_overflow(): for x in -2.0, -1.0, 0.0, 1.0, 2.0: verify(float(long(x)) == x) - shuge = '12345' * 1000 + shuge = '12345' * 120 huge = 1L << 30000 mhuge = -huge namespace = {'huge': huge, 'mhuge': mhuge, 'shuge': shuge, 'math': math}