Kaydet (Commit) ede187f0 authored tarafından Walter Dörwald's avatar Walter Dörwald

Test another error case in PyFloat_FromString().

üst 3f207b6a
...@@ -548,6 +548,8 @@ class BuiltinTest(unittest.TestCase): ...@@ -548,6 +548,8 @@ class BuiltinTest(unittest.TestCase):
if have_unicode: if have_unicode:
self.assertEqual(float(unicode(" 3.14 ")), 3.14) self.assertEqual(float(unicode(" 3.14 ")), 3.14)
self.assertEqual(float(unicode(" \u0663.\u0661\u0664 ",'raw-unicode-escape')), 3.14) self.assertEqual(float(unicode(" \u0663.\u0661\u0664 ",'raw-unicode-escape')), 3.14)
# Implementation limitation in PyFloat_FromString()
self.assertRaises(ValueError, float, unicode("1"*10000))
def test_float_with_comma(self): def test_float_with_comma(self):
# set locale to something that doesn't use '.' for the decimal point # set locale to something that doesn't use '.' for the decimal point
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment