gh-104482: Fix error handling bugs in ast.c (#104483)

This commit is contained in:
Irit Katriel 2023-05-15 21:53:55 +01:00 committed by GitHub
parent 26baa747c2
commit 8a3702f0c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 19 deletions

View file

@ -2035,6 +2035,12 @@ class ASTValidatorTests(unittest.TestCase):
kwd_attrs=[],
kwd_patterns=[ast.MatchStar()]
),
ast.MatchClass(
constant_true, # invalid name
patterns=[],
kwd_attrs=['True'],
kwd_patterns=[pattern_1]
),
ast.MatchSequence(
[
ast.MatchStar("True")