summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests/test_parser.py
diff options
context:
space:
mode:
authorƁukasz Langa <lukasz@langa.pl>2017-05-22 23:35:48 (GMT)
committerGitHub <noreply@github.com>2017-05-22 23:35:48 (GMT)
commit1b9530c536664276ce866ae602ce04adce0810e1 (patch)
tree6037af92088bd6818e873bb2a424d226ef0842db /Lib/lib2to3/tests/test_parser.py
parentddbfa2c35b298a56f0b813656745bca9cb7334f1 (diff)
downloadcpython-1b9530c536664276ce866ae602ce04adce0810e1.zip
cpython-1b9530c536664276ce866ae602ce04adce0810e1.tar.gz
cpython-1b9530c536664276ce866ae602ce04adce0810e1.tar.bz2
bpo-23894: make lib2to3 recognize f-strings (#1733)
Note: this doesn't unpack f-strings into the underlying JoinedStr AST. Ideally we'd fully implement JoinedStr here but given its additional complexity, I think this is worth bandaiding as is. This unblocks tools like https://github.com/google/yapf to format 3.6 syntax using f-strings.
Diffstat (limited to 'Lib/lib2to3/tests/test_parser.py')
-rw-r--r--Lib/lib2to3/tests/test_parser.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py
index c79611d..3f7ab97 100644
--- a/Lib/lib2to3/tests/test_parser.py
+++ b/Lib/lib2to3/tests/test_parser.py
@@ -344,6 +344,7 @@ class TestStringLiterals(GrammarTest):
"r'", 'r"', "R'", 'R"',
"u'", 'u"', "U'", 'U"',
"b'", 'b"', "B'", 'B"',
+ "f'", 'f"', "F'", 'F"',
"ur'", 'ur"', "Ur'", 'Ur"',
"uR'", 'uR"', "UR'", 'UR"',
"br'", 'br"', "Br'", 'Br"',