diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-06-07 22:31:26 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-06-07 22:31:26 (GMT) |
commit | 59a1b2f732e9c672ec03deb965bd682706d1ef24 (patch) | |
tree | 9cbe639f518af04965db43b22dabf8d18c88883f /Lib/test/test_unicode.py | |
parent | 5b92772e242f3302f11b1d6e3d451370b98e01d5 (diff) | |
download | cpython-59a1b2f732e9c672ec03deb965bd682706d1ef24.zip cpython-59a1b2f732e9c672ec03deb965bd682706d1ef24.tar.gz cpython-59a1b2f732e9c672ec03deb965bd682706d1ef24.tar.bz2 |
Merged revisions 81820 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81820 | benjamin.peterson | 2010-06-07 17:23:23 -0500 (Mon, 07 Jun 2010) | 1 line
correctly overflow when indexes are too large
........
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r-- | Lib/test/test_unicode.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 4ac0712..10714c8 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -681,6 +681,9 @@ class UnicodeTest(string_tests.CommonTest, self.assertRaises(IndexError, "{:}".format) self.assertRaises(IndexError, "{:s}".format) self.assertRaises(IndexError, "{}".format) + big = "23098475029384702983476098230754973209482573" + self.assertRaises(ValueError, ("{" + big + "}").format) + self.assertRaises(ValueError, ("{[" + big + "]}").format, [0]) # issue 6089 self.assertRaises(ValueError, "{0[0]x}".format, [None]) |