summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fstring.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_fstring.py')
-rw-r--r--Lib/test/test_fstring.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py
index a6ff9cf..2a1a3cd 100644
--- a/Lib/test/test_fstring.py
+++ b/Lib/test/test_fstring.py
@@ -287,6 +287,15 @@ f'{a * x()}'"""
"f' { } '",
r"f'{\n}'",
r"f'{\n \n}'",
+
+ # Catch the empty expression before the
+ # invalid conversion.
+ "f'{!x}'",
+ "f'{ !xr}'",
+ "f'{!x:}'",
+ "f'{!x:a}'",
+ "f'{ !xr:}'",
+ "f'{ !xr:a}'",
])
def test_parens_in_expressions(self):