Skip to content

gh-134036: Update test_syntax #135204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Lib/test/test_syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -1436,17 +1436,17 @@
>>> try: pass
... except TypeError as name: raise from None
Traceback (most recent call last):
SyntaxError: invalid syntax
SyntaxError: did you forget an expression between 'raise' and 'from'?

>>> try: pass
... except* TypeError as name: raise from None
Traceback (most recent call last):
SyntaxError: invalid syntax
SyntaxError: did you forget an expression between 'raise' and 'from'?

>>> match 1:
... case 1 | 2 as abc: raise from None
Traceback (most recent call last):
SyntaxError: invalid syntax
SyntaxError: did you forget an expression between 'raise' and 'from'?

Ensure that early = are not matched by the parser as invalid comparisons
>>> f(2, 4, x=34); 1 $ 2
Expand Down
Loading