From b2080f65544093c8f07b4ecc43fe035aeb08c8f0 Mon Sep 17 00:00:00 2001 From: "Eric V. Smith" Date: Wed, 23 Sep 2015 10:24:43 -0400 Subject: f-strings: More tests for empty expressions along with missing closing braces. --- Lib/test/test_fstring.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 10c5849..d6f781c 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): -- cgit v0.12