diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 10c5849cf32..d6f781c846e 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -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):