summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2009-05-23 14:04:31 (GMT)
committerEric Smith <eric@trueblade.com>2009-05-23 14:04:31 (GMT)
commitf73758f012268b8c6af6e021fb9f632154144229 (patch)
tree5d4bea10f1135ca81d9ca233f6a7b83f0ab0aa51 /Lib
parent262dbb10b81a38405409572eecb12ce5def35e5e (diff)
downloadcpython-f73758f012268b8c6af6e021fb9f632154144229.zip
cpython-f73758f012268b8c6af6e021fb9f632154144229.tar.gz
cpython-f73758f012268b8c6af6e021fb9f632154144229.tar.bz2
Merged revisions 72848 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72848 | eric.smith | 2009-05-23 09:56:13 -0400 (Sat, 23 May 2009) | 1 line Issue 6089: str.format raises SystemError. ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_str.py4
-rw-r--r--Lib/test/test_unicode.py4
2 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_str.py b/Lib/test/test_str.py
index 044711c..de988a8 100644
--- a/Lib/test/test_str.py
+++ b/Lib/test/test_str.py
@@ -351,6 +351,10 @@ class StrTest(
self.assertRaises(ValueError, "{:s}".format)
self.assertRaises(ValueError, "{}".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)
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 968f64b..96c15f0 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -1091,6 +1091,10 @@ class UnicodeTest(
self.assertRaises(ValueError, u"{:s}".format)
self.assertRaises(ValueError, u"{}".format)
+ # issue 6089
+ self.assertRaises(ValueError, u"{0[0]x}".format, [None])
+ self.assertRaises(ValueError, u"{0[0](10)}".format, [None])
+
# can't have a replacement on the field name portion
self.assertRaises(TypeError, u'{0[{1}]}'.format, u'abcdefg', 4)