diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2023-06-13 15:18:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 15:18:11 (GMT) |
commit | abfbab6415fb029e7dca19ecc8d29a13da37bf71 (patch) | |
tree | 2f4e113ed9c8c7c9e6cd49e246c5d415df2a6810 /Lib/test/test_tokenize.py | |
parent | d0f1afd9425e28409fbf535bb7d43472bfcffcef (diff) | |
download | cpython-abfbab6415fb029e7dca19ecc8d29a13da37bf71.zip cpython-abfbab6415fb029e7dca19ecc8d29a13da37bf71.tar.gz cpython-abfbab6415fb029e7dca19ecc8d29a13da37bf71.tar.bz2 |
gh-105718: Fix buffer allocation in tokenizer with readline (#105728)
Diffstat (limited to 'Lib/test/test_tokenize.py')
-rw-r--r-- | Lib/test/test_tokenize.py | 10 |
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) |