mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
correctly overflow when indexes are too large
This commit is contained in:
parent
0b41707dde
commit
13e934acc0
3 changed files with 10 additions and 0 deletions
|
@ -1282,6 +1282,9 @@ class UnicodeTest(
|
|||
self.assertRaises(IndexError, u"{:}".format)
|
||||
self.assertRaises(IndexError, u"{:s}".format)
|
||||
self.assertRaises(IndexError, u"{}".format)
|
||||
big = "23098475029384702983476098230754973209482573"
|
||||
self.assertRaises(ValueError, ("{" + big + "}").format)
|
||||
self.assertRaises(ValueError, ("{[" + big + "]}").format, [0])
|
||||
|
||||
# issue 6089
|
||||
self.assertRaises(ValueError, u"{0[0]x}".format, [None])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue