bpo-44143: Fix crash in the parser when raising tokenizer errors with an exception set (GH-26144)

This commit is contained in:
Pablo Galindo 2021-05-15 17:58:02 +01:00 committed by GitHub
parent 086b5c6ce1
commit 80b089179f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View file

@ -242,6 +242,7 @@ class ExceptionTests(unittest.TestCase):
""", 9, 24)
check("pass\npass\npass\n(1+)\npass\npass\npass", 4, 4)
check("(1+)", 1, 4)
check("[interesting\nfoo()\n", 1, 1)
# Errors thrown by symtable.c
check('x = [(yield i) for i in range(3)]', 1, 5)