Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ede187f

Browse files
committed
Test another error case in PyFloat_FromString().
1 parent 3f207b6 commit ede187f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/test/test_builtin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,8 @@ def test_float(self):
548548
if have_unicode:
549549
self.assertEqual(float(unicode(" 3.14 ")), 3.14)
550550
self.assertEqual(float(unicode(" \u0663.\u0661\u0664 ",'raw-unicode-escape')), 3.14)
551+
# Implementation limitation in PyFloat_FromString()
552+
self.assertRaises(ValueError, float, unicode("1"*10000))
551553

552554
def test_float_with_comma(self):
553555
# set locale to something that doesn't use '.' for the decimal point

0 commit comments

Comments
 (0)