summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-15 21:32:59 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-15 21:32:59 (GMT)
commite1083734ec19709a9c30f8df93e61fb079e93d8d (patch)
tree24bbe52aa91053efcf8884549d2f564c760a0727 /Lib/test/test_builtin.py
parenta45ea5828e8e9ca9ed18c0de7d81486a86bbe058 (diff)
downloadcpython-e1083734ec19709a9c30f8df93e61fb079e93d8d.zip
cpython-e1083734ec19709a9c30f8df93e61fb079e93d8d.tar.gz
cpython-e1083734ec19709a9c30f8df93e61fb079e93d8d.tar.bz2
It's ok for __hex__ or __oct__ to return unicode.
Don't insist that float('1'*10000) raises an exception.
Diffstat (limited to 'Lib/test/test_builtin.py')
-rw-r--r--Lib/test/test_builtin.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index a11e40a..54df9e1 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -608,8 +608,7 @@ class BuiltinTest(unittest.TestCase):
if have_unicode:
self.assertEqual(float(str(" 3.14 ")), 3.14)
self.assertEqual(float(str(b" \u0663.\u0661\u0664 ",'raw-unicode-escape')), 3.14)
- # Implementation limitation in PyFloat_FromString()
- self.assertRaises(ValueError, float, str("1"*10000))
+ self.assertEqual(float("1"*10000), 1e10000) # Inf on both sides
@run_with_locale('LC_NUMERIC', 'fr_FR', 'de_DE')
def test_float_with_comma(self):