Home - Summaries: (main) : (py3.11) : (py3.12) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

lib-python/3/test/test_syntax.py::unmodified

== PyPy 3.12.13 (ca22ba800394, Aug 24 2026, 03:30:22) [PyPy 8.0.0-alpha0 with GCC Apple LLVM 16.0.0 (clang-1600.0.26.6)]
== macOS-15.7.7-arm64-arm-64bit little-endian
== Python build: release with_assert
== cwd: /private/tmp/buildbot-arm64/pytest/test_python_worker_45556æ
== CPU count: 8
== encodings: locale=UTF-8 FS=utf-8
== resources (3): curses,gui,network

Using random seed: 390476120
Raised RLIMIT_NOFILE: 256 -> 1024
0:00:00 load avg: 6.10 Run 1 test sequentially in a single process
0:00:00 load avg: 6.10 [1/1] test_syntax
test_assign_call (test.test_syntax.SyntaxTestCase.test_assign_call) ... ok
test_assign_del (test.test_syntax.SyntaxTestCase.test_assign_del) ... ok
test_async_with_statement_many_context_managers (test.test_syntax.SyntaxTestCase.test_async_with_statement_many_context_managers) ... skipped 'implementation detail specific to cpython'
test_bad_outdent (test.test_syntax.SyntaxTestCase.test_bad_outdent) ... ok
test_barry_as_flufl_with_syntax_errors (test.test_syntax.SyntaxTestCase.test_barry_as_flufl_with_syntax_errors) ... ok
test_break_outside_loop (test.test_syntax.SyntaxTestCase.test_break_outside_loop) ... ok
test_case_call_does_not_raise_syntax_error (test.test_syntax.SyntaxTestCase.test_case_call_does_not_raise_syntax_error) ... ok
test_continuation_bad_indentation (test.test_syntax.SyntaxTestCase.test_continuation_bad_indentation) ... ok
test_continue_outside_loop (test.test_syntax.SyntaxTestCase.test_continue_outside_loop) ... ok
test_curly_brace_after_primary_raises_immediately (test.test_syntax.SyntaxTestCase.test_curly_brace_after_primary_raises_immediately) ... ok
test_deep_invalid_rule (test.test_syntax.SyntaxTestCase.test_deep_invalid_rule) ... skipped 'implementation detail specific to cpython'
test_disallowed_type_param_names (test.test_syntax.SyntaxTestCase.test_disallowed_type_param_names) ... skipped 'implementation detail specific to cpython'
test_empty_line_after_linecont (test.test_syntax.SyntaxTestCase.test_empty_line_after_linecont) ... ok
test_error_on_parser_stack_overflow (test.test_syntax.SyntaxTestCase.test_error_on_parser_stack_overflow) ... skipped 'implementation detail specific to cpython'
test_error_parenthesis (test.test_syntax.SyntaxTestCase.test_error_parenthesis) ... FAIL
test_error_string_literal (test.test_syntax.SyntaxTestCase.test_error_string_literal) ... ok
test_except_star_then_except (test.test_syntax.SyntaxTestCase.test_except_star_then_except) ... ok
test_except_then_except_star (test.test_syntax.SyntaxTestCase.test_except_then_except_star) ... ok
test_expression_with_assignment (test.test_syntax.SyntaxTestCase.test_expression_with_assignment) ... ok
test_generator_in_function_call (test.test_syntax.SyntaxTestCase.test_generator_in_function_call) ... ok
test_global_param_err_first (test.test_syntax.SyntaxTestCase.test_global_param_err_first) ... ok
test_invalid_line_continuation_error_position (test.test_syntax.SyntaxTestCase.test_invalid_line_continuation_error_position) ... ok
test_invalid_line_continuation_left_recursive (test.test_syntax.SyntaxTestCase.test_invalid_line_continuation_left_recursive) ... ok
test_invisible_characters (test.test_syntax.SyntaxTestCase.test_invisible_characters) ... ok
test_kwargs_last (test.test_syntax.SyntaxTestCase.test_kwargs_last) ... ok
test_kwargs_last2 (test.test_syntax.SyntaxTestCase.test_kwargs_last2) ... ok
test_kwargs_last3 (test.test_syntax.SyntaxTestCase.test_kwargs_last3) ... ok
test_match_call_does_not_raise_syntax_error (test.test_syntax.SyntaxTestCase.test_match_call_does_not_raise_syntax_error) ... ok
test_multiline_compiler_error_points_to_the_end (test.test_syntax.SyntaxTestCase.test_multiline_compiler_error_points_to_the_end) ... ok
test_nested_named_except_blocks (test.test_syntax.SyntaxTestCase.test_nested_named_except_blocks) ... skipped 'implementation detail specific to cpython'
test_no_indent (test.test_syntax.SyntaxTestCase.test_no_indent) ... ok
test_nonlocal_param_err_first (test.test_syntax.SyntaxTestCase.test_nonlocal_param_err_first) ... ok
test_return_outside_function (test.test_syntax.SyntaxTestCase.test_return_outside_function) ... ok
test_syntax_error_on_deeply_nested_blocks (test.test_syntax.SyntaxTestCase.test_syntax_error_on_deeply_nested_blocks) ... skipped 'implementation detail specific to cpython'
test_unexpected_indent (test.test_syntax.SyntaxTestCase.test_unexpected_indent) ... ok
test_with_statement_many_context_managers (test.test_syntax.SyntaxTestCase.test_with_statement_many_context_managers) ... skipped 'implementation detail specific to cpython'
test_yield_outside_function (test.test_syntax.SyntaxTestCase.test_yield_outside_function) ... ok
test_syntax (test)
Doctest: test.test_syntax ... FAIL

======================================================================
FAIL: test_error_parenthesis (test.test_syntax.SyntaxTestCase.test_error_parenthesis)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 2033, in _check_error
    compile(code, filename, mode)
  File "<testcase>", line 1
    a = ( 1, 2, 3
b=3
                ^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 2378, in test_error_parenthesis
    self._check_error(f"a = {paren} 1, 2, 3\nb=3", f"\\{paren}' was never closed")
         ^^^^^^^^^^^^
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 2039, in _check_error
    self.fail("SyntaxError did not contain %r" % (errtext,))
         ^^^^
AssertionError: SyntaxError did not contain "\\(' was never closed"

======================================================================
FAIL: test_syntax (test)
Doctest: test.test_syntax
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 2256, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for test.test_syntax
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 0, in test_syntax

----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 350, in test.test_syntax
Failed example:
    def f(x, /, y=1, z):
        pass
Expected:
    Traceback (most recent call last):
    SyntaxError: parameter without a default follows parameter with a default
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[70]>", line 1
        def f(x, /, y=1, z):
                          ^
    SyntaxError: invalid syntax
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 578, in test.test_syntax
Failed example:
    lambda a,/,d=3,c: None
Expected:
    Traceback (most recent call last):
    SyntaxError: parameter without a default follows parameter with a default
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[120]>", line 1
        lambda a,/,d=3,c: None
                        ^
    SyntaxError: invalid syntax
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 770, in test.test_syntax
Failed example:
    f(a=)
Expected:
    Traceback (most recent call last):
    SyntaxError: expected argument value expression
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[152]>", line 1
        f(a=)
            ^
    SyntaxError: invalid syntax
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 773, in test.test_syntax
Failed example:
    f(a, b, c=)
Expected:
    Traceback (most recent call last):
    SyntaxError: expected argument value expression
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[153]>", line 1
        f(a, b, c=)
                  ^
    SyntaxError: invalid syntax
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 776, in test.test_syntax
Failed example:
    f(a, b, c=, d)
Expected:
    Traceback (most recent call last):
    SyntaxError: expected argument value expression
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[154]>", line 1
        f(a, b, c=, d)
                  ^
    SyntaxError: invalid syntax
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 779, in test.test_syntax
Failed example:
    f(*args=[0])
Expected:
    Traceback (most recent call last):
    SyntaxError: cannot assign to iterable argument unpacking
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[155]>", line 1
        f(*args=[0])
               ^
    SyntaxError: invalid syntax
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 782, in test.test_syntax
Failed example:
    f(a, b, *args=[0])
Expected:
    Traceback (most recent call last):
    SyntaxError: cannot assign to iterable argument unpacking
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[156]>", line 1
        f(a, b, *args=[0])
                     ^
    SyntaxError: invalid syntax
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 785, in test.test_syntax
Failed example:
    f(**kwargs={'a': 1})
Expected:
    Traceback (most recent call last):
    SyntaxError: cannot assign to keyword argument unpacking
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[157]>", line 1
        f(**kwargs={'a': 1})
                  ^
    SyntaxError: invalid syntax
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 788, in test.test_syntax
Failed example:
    f(a, b, *args, **kwargs={'a': 1})
Expected:
    Traceback (most recent call last):
    SyntaxError: cannot assign to keyword argument unpacking
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[158]>", line 1
        f(a, b, *args, **kwargs={'a': 1})
                               ^
    SyntaxError: invalid syntax
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1028, in test.test_syntax
Failed example:
    class A[T]
        pass
Expected:
    Traceback (most recent call last):
    SyntaxError: expected ':'
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[191]>", line 1
        class A[T]
                  ^
    SyntaxError: invalid syntax
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1033, in test.test_syntax
Failed example:
    class A[T]()
        pass
Expected:
    Traceback (most recent call last):
    SyntaxError: expected ':'
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[192]>", line 1
        class A[T]()
                    ^
    SyntaxError: invalid syntax
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1475, in test.test_syntax
Failed example:
    def foo[T](x, /, y, *, z=2):
    pass
Expected:
    Traceback (most recent call last):
    IndentationError: expected an indented block after function definition on line 1
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[268]>", line 2
        pass
        ^^^^
    IndentationError: expected an indented block
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1485, in test.test_syntax
Failed example:
    class Blech[T](A):
    pass
Expected:
    Traceback (most recent call last):
    IndentationError: expected an indented block after class definition on line 1
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[270]>", line 2
        pass
        ^^^^
    IndentationError: expected an indented block
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1928, in test.test_syntax
Failed example:
    type A[T: (x:=3)] = int
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: named expression cannot be used within a TypeVar bound
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[353]>", line 1
    SyntaxError: named expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1933, in test.test_syntax
Failed example:
    type A[T: (yield 3)] = int
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: yield expression cannot be used within a TypeVar bound
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[354]>", line 1
    SyntaxError: yield expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1938, in test.test_syntax
Failed example:
    type A[T: (await 3)] = int
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: await expression cannot be used within a TypeVar bound
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[355]>", line 1
    SyntaxError: await expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1943, in test.test_syntax
Failed example:
    type A[T: (yield from [])] = int
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: yield expression cannot be used within a TypeVar bound
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[356]>", line 1
    SyntaxError: yield expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1948, in test.test_syntax
Failed example:
    type A = (x := 3)
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: named expression cannot be used within a type alias
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[357]>", line 1
    SyntaxError: named expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1953, in test.test_syntax
Failed example:
    type A = (yield 3)
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: yield expression cannot be used within a type alias
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[358]>", line 1
    SyntaxError: yield expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1958, in test.test_syntax
Failed example:
    type A = (await 3)
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: await expression cannot be used within a type alias
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[359]>", line 1
    SyntaxError: await expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1963, in test.test_syntax
Failed example:
    type A = (yield from [])
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: yield expression cannot be used within a type alias
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[360]>", line 1
    SyntaxError: yield expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1968, in test.test_syntax
Failed example:
    class A[T]((x := 3)): ...
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: named expression cannot be used within the definition of a generic
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[361]>", line 1
    SyntaxError: named expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1973, in test.test_syntax
Failed example:
    class A[T]((yield 3)): ...
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: yield expression cannot be used within the definition of a generic
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[362]>", line 1
    SyntaxError: yield expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1978, in test.test_syntax
Failed example:
    class A[T]((await 3)): ...
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: await expression cannot be used within the definition of a generic
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[363]>", line 1
    SyntaxError: await expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_syntax.py", line 1983, in test.test_syntax
Failed example:
    class A[T]((yield from [])): ...
Expected:
    Traceback (most recent call last):
       ...
    SyntaxError: yield expression cannot be used within the definition of a generic
Got:
    Traceback (most recent call last):
      File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[364]>", line 1
    SyntaxError: yield expression cannot be used within an annotation scope


----------------------------------------------------------------------
Ran 38 tests in 0.119s

FAILED (failures=2, skipped=7)
0:00:00 load avg: 6.17 [1/1/1] test_syntax failed (2 failures)

== Tests result: FAILURE ==

1 test failed:
    test_syntax

Total duration: 260 ms
Total tests: run=38 failures=2 skipped=7
Total test files: run=1/1 failed=1
Result: FAILURE
test test_syntax failed
builder: pypy-c-jit-macos-arm64 build #1388+
test: lib-python/3/test/test_syntax.py::unmodified