From 35a24c5a436a8b3ebff6cedce18084bdce2f77a3 Mon Sep 17 00:00:00 2001 From: "Eric V. Smith" Date: Sun, 11 Sep 2016 19:01:22 -0400 Subject: [PATCH] Add another f-string comment test, to make sure # are being caught in the right place. --- Lib/test/test_fstring.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 655819425d1..92995fd83e3 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -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):