summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-05-17 22:34:30 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-05-17 22:34:30 (GMT)
commitd2b58a9880d119b20e1fc1c82a3e2e2d9eaa0817 (patch)
tree2b45e6e8db8d100937e4e0edfefc5470216c3f1d /Lib
parent36f74aa7f711c9defc01ab8522117b2b7db8ccd3 (diff)
downloadcpython-d2b58a9880d119b20e1fc1c82a3e2e2d9eaa0817.zip
cpython-d2b58a9880d119b20e1fc1c82a3e2e2d9eaa0817.tar.gz
cpython-d2b58a9880d119b20e1fc1c82a3e2e2d9eaa0817.tar.bz2
only recursively expand in the format spec (closes #17644)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_unicode.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index d4e2222..bef64aa 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -934,6 +934,8 @@ class UnicodeTest(string_tests.CommonTest,
self.assertEqual("{0:.0s}".format("ABC\u0410\u0411\u0412"),
'')
+ self.assertEqual("{[{}]}".format({"{}": 5}), "5")
+
def test_format_map(self):
self.assertEqual(''.format_map({}), '')
self.assertEqual('a'.format_map({}), 'a')