diff options
author | Eric V. Smith <eric@trueblade.com> | 2015-09-29 14:27:38 (GMT) |
---|---|---|
committer | Eric V. Smith <eric@trueblade.com> | 2015-09-29 14:27:38 (GMT) |
commit | 85976b14ddb941670ee831ed18b5bc69ca1380ac (patch) | |
tree | bd300f6ae190564bfba85049854ed8ea9ab6ab9c /Lib/test | |
parent | b8b951f6ee349f6e808f67f0424e71d91802223b (diff) | |
download | cpython-85976b14ddb941670ee831ed18b5bc69ca1380ac.zip cpython-85976b14ddb941670ee831ed18b5bc69ca1380ac.tar.gz cpython-85976b14ddb941670ee831ed18b5bc69ca1380ac.tar.bz2 |
Fixed issue #25034: Fix string.Formatter problem with auto-numbering
and nested format_specs. Patch by Anthon van der Neut.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_string.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_string.py b/Lib/test/test_string.py index 30fe42a..57963bf 100644 --- a/Lib/test/test_string.py +++ b/Lib/test/test_string.py @@ -54,6 +54,8 @@ class ModuleTest(unittest.TestCase): 'foo{1}{num}{1}'.format(None, 'bar', num=6)) self.assertEqual(fmt.format('{:^{}}', 'bar', 6), '{:^{}}'.format('bar', 6)) + self.assertEqual(fmt.format('{:^{}} {}', 'bar', 6, 'X'), + '{:^{}} {}'.format('bar', 6, 'X')) self.assertEqual(fmt.format('{:^{pad}}{}', 'foo', 'bar', pad=6), '{:^{pad}}{}'.format('foo', 'bar', pad=6)) |