]> granicus.if.org Git - python/commitdiff
Test another error case in PyFloat_FromString().
authorWalter Dörwald <walter@livinglogic.de>
Tue, 29 Nov 2005 15:45:14 +0000 (15:45 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Tue, 29 Nov 2005 15:45:14 +0000 (15:45 +0000)
Lib/test/test_builtin.py

index dd008745c9ba763a3ef967493441a59474161cb1..c8a4822c7f5374c5233130343fb3b142fead9244 100644 (file)
@@ -548,6 +548,8 @@ class BuiltinTest(unittest.TestCase):
         if have_unicode:
             self.assertEqual(float(unicode("  3.14  ")), 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):
         # set locale to something that doesn't use '.' for the decimal point