[Python-checkins] cpython: f-strings: More tests for empty expressions along with missing closing braces.
eric.smith
python-checkins at python.org
Wed Sep 23 16:24:54 CEST 2015
https://hg.python.org/cpython/rev/288681785d26
changeset: 98221:288681785d26
user: Eric V. Smith <eric at trueblade.com>
date: Wed Sep 23 10:24:43 2015 -0400
summary:
f-strings: More tests for empty expressions along with missing closing braces.
files:
Lib/test/test_fstring.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py
--- a/Lib/test/test_fstring.py
+++ b/Lib/test/test_fstring.py
@@ -299,6 +299,13 @@
"f'{!}'",
"f'{:}'",
+
+ # We find the empty expression before the
+ # missing closing brace.
+ "f'{!'",
+ "f'{!s:'",
+ "f'{:'",
+ "f'{:x'",
])
def test_parens_in_expressions(self):
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list