Issue 6089: str.format raises SystemError.

This commit is contained in:
Eric Smith 2009-05-23 13:56:13 +00:00
parent 8254d39840
commit 4b94b192ff
3 changed files with 11 additions and 2 deletions

View file

@ -351,6 +351,10 @@ class StrTest(
self.assertRaises(IndexError, "{:s}".format)
self.assertRaises(IndexError, "{}".format)
# issue 6089
self.assertRaises(ValueError, "{0[0]x}".format, [None])
self.assertRaises(ValueError, "{0[0](10)}".format, [None])
# can't have a replacement on the field name portion
self.assertRaises(TypeError, '{0[{1}]}'.format, 'abcdefg', 4)