summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests/test_parser.py
diff options
context:
space:
mode:
authorƁukasz Langa <lukasz@langa.pl>2017-05-23 05:23:29 (GMT)
committerGitHub <noreply@github.com>2017-05-23 05:23:29 (GMT)
commite8412e684ed741df246e8430f4911b31b0d8be1f (patch)
treee74ad5f426d1c5f4d8846575c4423c26b9800802 /Lib/lib2to3/tests/test_parser.py
parentd29feccec3ce3dcd9ab3100f8956171c70ec3027 (diff)
downloadcpython-e8412e684ed741df246e8430f4911b31b0d8be1f.zip
cpython-e8412e684ed741df246e8430f4911b31b0d8be1f.tar.gz
cpython-e8412e684ed741df246e8430f4911b31b0d8be1f.tar.bz2
[3.6] bpo-23894: make lib2to3 recognize f-strings (GH-1733) (#1737)
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. (cherry picked from commit 1b9530c536664276ce866ae602ce04adce0810e1)
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"',