]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
f-strings: More tests for empty expressions along with missing closing braces.
authorEric V. Smith <eric@trueblade.com>
Wed, 23 Sep 2015 14:24:43 +0000 (10:24 -0400)
committerEric V. Smith <eric@trueblade.com>
Wed, 23 Sep 2015 14:24:43 +0000 (10:24 -0400)
Lib/test/test_fstring.py

index 10c5849cf32a69efbccb9a741adadaa38f9def32..d6f781c846e28dcf7acea1e11a48f99799ac5d45 100644 (file)
@@ -299,6 +299,13 @@ f'{a * x()}'"""
 
                              "f'{!}'",
                              "f'{:}'",
+
+                             # We find the empty expression before the
+                             #  missing closing brace.
+                             "f'{!'",
+                             "f'{!s:'",
+                             "f'{:'",
+                             "f'{:x'",
                              ])
 
     def test_parens_in_expressions(self):