summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-13 15:53:51 (GMT)
committerGitHub <noreply@github.com>2023-06-13 15:53:51 (GMT)
commit9c51ea5d550dbcf5568b57913b1b453d1f92fd5c (patch)
treee2472bf02721494086fbca953bef4db67f93692c /Lib/test
parent04b91680373149077f8c466e6694b97966e1f2c6 (diff)
downloadcpython-9c51ea5d550dbcf5568b57913b1b453d1f92fd5c.zip
cpython-9c51ea5d550dbcf5568b57913b1b453d1f92fd5c.tar.gz
cpython-9c51ea5d550dbcf5568b57913b1b453d1f92fd5c.tar.bz2
[3.12] gh-105718: Fix buffer allocation in tokenizer with readline (GH-105728) (#105729)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_tokenize.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py
index df9c9db..15f5363 100644
--- a/Lib/test/test_tokenize.py
+++ b/Lib/test/test_tokenize.py
@@ -2241,6 +2241,16 @@ def"', """\
FSTRING_END '"' (2, 3) (2, 4)
""")
+ self.check_tokenize('''\
+f"{
+a}"''', """\
+ FSTRING_START 'f"' (1, 0) (1, 2)
+ LBRACE '{' (1, 2) (1, 3)
+ NAME 'a' (2, 0) (2, 1)
+ RBRACE '}' (2, 1) (2, 2)
+ FSTRING_END '"' (2, 2) (2, 3)
+ """)
+
self.check_tokenize(r'Rf"abc\
def"', """\
FSTRING_START 'Rf"' (1, 0) (1, 3)