summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py31
1 files changed, 16 insertions, 15 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 52b7b4f..64cca3f 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -542,29 +542,30 @@ class UnicodeTest(
self.assertRaises(ValueError, 'a}'.format)
self.assertRaises(ValueError, '{a'.format)
self.assertRaises(ValueError, '}a'.format)
- self.assertRaises(ValueError, '{0}'.format)
- self.assertRaises(ValueError, '{1}'.format, 'abc')
- self.assertRaises(ValueError, '{x}'.format)
+ self.assertRaises(IndexError, '{0}'.format)
+ self.assertRaises(IndexError, '{1}'.format, 'abc')
+ self.assertRaises(KeyError, '{x}'.format)
self.assertRaises(ValueError, "}{".format)
self.assertRaises(ValueError, "{".format)
self.assertRaises(ValueError, "}".format)
self.assertRaises(ValueError, "abc{0:{}".format)
self.assertRaises(ValueError, "{0".format)
- self.assertRaises(ValueError, "{0.}".format)
- self.assertRaises(ValueError, "{0[}".format)
+ self.assertRaises(IndexError, "{0.}".format)
+ self.assertRaises(ValueError, "{0.}".format, 0)
+ self.assertRaises(IndexError, "{0[}".format)
self.assertRaises(ValueError, "{0[}".format, [])
- self.assertRaises(ValueError, "{0]}".format)
- self.assertRaises(ValueError, "{0.[]}".format)
+ self.assertRaises(KeyError, "{0]}".format)
+ self.assertRaises(ValueError, "{0.[]}".format, 0)
self.assertRaises(ValueError, "{0..foo}".format, 0)
- self.assertRaises(ValueError, "{0[0}".format)
- self.assertRaises(ValueError, "{0[0:foo}".format)
- self.assertRaises(ValueError, "{c]}".format)
- self.assertRaises(ValueError, "{{ {{{0}}".format)
- self.assertRaises(ValueError, "{0}}".format)
- self.assertRaises(ValueError, "{foo}".format, bar=3)
+ self.assertRaises(ValueError, "{0[0}".format, 0)
+ self.assertRaises(ValueError, "{0[0:foo}".format, 0)
+ self.assertRaises(KeyError, "{c]}".format)
+ self.assertRaises(ValueError, "{{ {{{0}}".format, 0)
+ self.assertRaises(ValueError, "{0}}".format, 0)
+ self.assertRaises(KeyError, "{foo}".format, bar=3)
self.assertRaises(ValueError, "{0!x}".format, 3)
- self.assertRaises(ValueError, "{0!}".format)
- self.assertRaises(ValueError, "{0!rs}".format)
+ self.assertRaises(ValueError, "{0!}".format, 0)
+ self.assertRaises(ValueError, "{0!rs}".format, 0)
self.assertRaises(ValueError, "{!}".format)
self.assertRaises(ValueError, "{:}".format)
self.assertRaises(ValueError, "{:s}".format)