[Python-checkins] cpython: Add another f-string comment test, to make sure # are being caught in the right
eric.smith
python-checkins at python.org
Sun Sep 11 19:01:29 EDT 2016
https://hg.python.org/cpython/rev/ceb9f08e8155
changeset: 103667:ceb9f08e8155
user: Eric V. Smith <eric at trueblade.com>
date: Sun Sep 11 19:01:22 2016 -0400
summary:
Add another f-string comment test, to make sure # are being caught in the right place.
files:
Lib/test/test_fstring.py | 2 ++
1 files changed, 2 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
@@ -186,6 +186,8 @@
["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):
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list