summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2016-09-11 23:01:22 (GMT)
committerEric V. Smith <eric@trueblade.com>2016-09-11 23:01:22 (GMT)
commit35a24c5a436a8b3ebff6cedce18084bdce2f77a3 (patch)
tree8f7ea009801b2c0f49e9d6639ffc2159b25e2deb /Lib
parent09835dcdbb8bb9c5f355ed55d2fa8c0d140ee7ee (diff)
downloadcpython-35a24c5a436a8b3ebff6cedce18084bdce2f77a3.zip
cpython-35a24c5a436a8b3ebff6cedce18084bdce2f77a3.tar.gz
cpython-35a24c5a436a8b3ebff6cedce18084bdce2f77a3.tar.bz2
Add another f-string comment test, to make sure # are being caught in the right place.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_fstring.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py
index 6558194..92995fd 100644
--- a/Lib/test/test_fstring.py
+++ b/Lib/test/test_fstring.py
@@ -186,6 +186,8 @@ f'{a * x()}'"""
["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):