diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 655819425d13..92995fd83e38 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -186,6 +186,8 @@ def test_comments(self): ["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):