]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-134036: Update test_syntax for gh-133999 (#135204)
authorVictor Stinner <vstinner@python.org>
Fri, 6 Jun 2025 12:22:14 +0000 (14:22 +0200)
committerGitHub <noreply@github.com>
Fri, 6 Jun 2025 12:22:14 +0000 (12:22 +0000)
Lib/test/test_syntax.py

index 965c096475f5903ef40e310bb5f571834a74364b..13aaba405e3204d5ba8b4b38820bf57a854e5bab 100644 (file)
@@ -1436,17 +1436,17 @@ Regression tests for gh-133999:
    >>> 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