summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2012-03-12 22:29:06 (GMT)
committerEric V. Smith <eric@trueblade.com>2012-03-12 22:29:06 (GMT)
commitf2bb8898eac404301821c2d1cae9f9614d9bde29 (patch)
treec256b17c3dca8071b5614aba77419fca4308f147 /Lib
parent56bac7b9e13cc77927383a5bf97f30c3211fc7a8 (diff)
parent97722c41320bd42d381027c4c95296352bcb44fa (diff)
downloadcpython-f2bb8898eac404301821c2d1cae9f9614d9bde29.zip
cpython-f2bb8898eac404301821c2d1cae9f9614d9bde29.tar.gz
cpython-f2bb8898eac404301821c2d1cae9f9614d9bde29.tar.bz2
Merge heads.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_unicode.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 33d7b35..813d59f 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -957,12 +957,15 @@ class UnicodeTest(string_tests.CommonTest,
self.assertEqual('{foo._x}'.format_map({'foo': C(20)}), '20')
# test various errors
- self.assertRaises(TypeError, '{'.format_map)
- self.assertRaises(TypeError, '}'.format_map)
- self.assertRaises(TypeError, 'a{'.format_map)
- self.assertRaises(TypeError, 'a}'.format_map)
- self.assertRaises(TypeError, '{a'.format_map)
- self.assertRaises(TypeError, '}a'.format_map)
+ self.assertRaises(TypeError, ''.format_map)
+ self.assertRaises(TypeError, 'a'.format_map)
+
+ self.assertRaises(ValueError, '{'.format_map, {})
+ self.assertRaises(ValueError, '}'.format_map, {})
+ self.assertRaises(ValueError, 'a{'.format_map, {})
+ self.assertRaises(ValueError, 'a}'.format_map, {})
+ self.assertRaises(ValueError, '{a'.format_map, {})
+ self.assertRaises(ValueError, '}a'.format_map, {})
# issue #12579: can't supply positional params to format_map
self.assertRaises(ValueError, '{}'.format_map, {'a' : 2})