]> granicus.if.org Git - python/commitdiff
Add another f-string comment test, to make sure # are being caught in the right place.
authorEric V. Smith <eric@trueblade.com>
Sun, 11 Sep 2016 23:01:22 +0000 (19:01 -0400)
committerEric V. Smith <eric@trueblade.com>
Sun, 11 Sep 2016 23:01:22 +0000 (19:01 -0400)
Lib/test/test_fstring.py

index 655819425d13ff39a7e50ebb990e1bdb34193f29..92995fd83e38d68ba4deca6c7e626445613c3cd4 100644 (file)
@@ -186,6 +186,8 @@ f'{a * x()}'"""
                             ["f'{1#}'",   # error because the expression becomes "(1#)"
                              "f'{3(#)}'",
                              "f'{#}'",
+                             "f'{)#}'",   # When wrapped in parens, this becomes
+                                          #  '()#)'.  Make sure that doesn't compile.
                              ])
 
     def test_many_expressions(self):