summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2011-07-18 18:08:55 (GMT)
committerEric V. Smith <eric@trueblade.com>2011-07-18 18:08:55 (GMT)
commitc12469df227a7ec8a268c9a6dae4f52c70c0635a (patch)
tree6e803338b7602f564998ae57f5d670f7bf93a760 /Lib/test/test_unicode.py
parent677b6530b024d905f094908f6519a0316cde5d77 (diff)
parent12ebefc9d3b7268d17d4a042767f712c46d03dfe (diff)
downloadcpython-c12469df227a7ec8a268c9a6dae4f52c70c0635a.zip
cpython-c12469df227a7ec8a268c9a6dae4f52c70c0635a.tar.gz
cpython-c12469df227a7ec8a268c9a6dae4f52c70c0635a.tar.bz2
Merge from 3.2.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 2cb923f..1da44b0 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -736,6 +736,11 @@ class UnicodeTest(string_tests.CommonTest,
self.assertRaises(TypeError, '{a'.format_map)
self.assertRaises(TypeError, '}a'.format_map)
+ # issue #12579: can't supply positional params to format_map
+ self.assertRaises(ValueError, '{}'.format_map, {'a' : 2})
+ self.assertRaises(ValueError, '{}'.format_map, 'a')
+ self.assertRaises(ValueError, '{a} {}'.format_map, {"a" : 2, "b" : 1})
+
def test_format_auto_numbering(self):
class C:
def __init__(self, x=100):