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

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

== PyPy 3.12.13 (e99dc7a98783, Jul 10 2026, 06:28:39) [PyPy 8.0.0-alpha0 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
== Linux-4.19.90-2202.1.0.0136.oe1.aarch64-aarch64-with-glibc2.17 little-endian
== Python build: release with_assert
== cwd: /tmp/pytest/test_python_worker_819850æ
== CPU count: 4
== encodings: locale=UTF-8 FS=utf-8
== resources (3): curses,gui,network

Using random seed: 2967244895
0:00:00 load avg: 0.72 Run 1 test sequentially in a single process
0:00:00 load avg: 0.72 [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) ... FAIL
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) ... FAIL
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_break_outside_loop (test.test_syntax.SyntaxTestCase.test_break_outside_loop)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 2034, in _check_error
    compile(code, filename, mode)
  File "<testcase>", line 1
    break
    ^^^^
SyntaxError: 'break' not properly in loop

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 2147, in test_break_outside_loop
    self._check_error("break", msg, lineno=1)
         ^^^^^^^^^^^^
  File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 2040, in _check_error
    self.fail("SyntaxError did not contain %r" % (errtext,))
         ^^^^
AssertionError: SyntaxError did not contain 'outside loop'

======================================================================
FAIL: test_error_parenthesis (test.test_syntax.SyntaxTestCase.test_error_parenthesis)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 2034, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 2376, in test_error_parenthesis
    self._check_error(f"a = {paren} 1, 2, 3\nb=3", f"\\{paren}' was never closed")
         ^^^^^^^^^^^^
  File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 2040, in _check_error
    self.fail("SyntaxError did not contain %r" % (errtext,))
         ^^^^
AssertionError: SyntaxError did not contain "\\(' was never closed"

======================================================================
FAIL: test_invalid_line_continuation_left_recursive (test.test_syntax.SyntaxTestCase.test_invalid_line_continuation_left_recursive)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 2034, in _check_error
    compile(code, filename, mode)
  File "<testcase>", line 1
    A.μ\
       ^
SyntaxError: unexpected end of file (EOF) in multi-line statement

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 2368, in test_invalid_line_continuation_left_recursive
    self._check_error("A.\u03bc\\\n",
         ^^^^^^^^^^^^
  File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 2040, in _check_error
    self.fail("SyntaxError did not contain %r" % (errtext,))
         ^^^^
AssertionError: SyntaxError did not contain 'unexpected EOF while parsing'

======================================================================
FAIL: test_syntax (test)
Doctest: test.test_syntax
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 0, in test_syntax

----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 341, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[69]>", line 1
        def f(x, y=1, z):
                      ^
    SyntaxError: non-default argument follows default argument
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 346, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 570, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[119]>", line 1
        lambda a,d=3,c: None
                     ^
    SyntaxError: non-default argument follows default argument
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 574, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 766, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 769, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 772, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 775, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 778, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 781, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 784, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 873, in test.test_syntax
Failed example:
    try:
        print(1)
        break
        print(2)
    finally:
        print(3)
Expected:
    Traceback (most recent call last):
      ...
    SyntaxError: 'break' outside loop
Got:
    Traceback (most recent call last):
      File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[172]>", line 3
        break
        ^^^^^
    SyntaxError: 'break' not properly in loop
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1024, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1029, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1144, in test.test_syntax
Failed example:
    match x x:
      case list():
          pass
Expected:
    Traceback (most recent call last):
    SyntaxError: invalid syntax
Got:
    Traceback (most recent call last):
      File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[212]>", line 1
        match x x:
                 ^
    SyntaxError: expected ':'
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1471, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1481, 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 "/build_dir/pypy-c-jit-linux-aarch64/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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1930, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[353]>", line 1
        type A[T: (x:=3)] = int
                   ^^^^
    SyntaxError: named expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1935, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[354]>", line 1
        type A[T: (yield 3)] = int
                   ^^^^^^^
    SyntaxError: yield expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1940, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[355]>", line 1
        type A[T: (await 3)] = int
                   ^^^^^^^
    SyntaxError: await expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1945, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[356]>", line 1
        type A[T: (yield from [])] = int
                   ^^^^^^^^^^^^^
    SyntaxError: yield expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1950, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[357]>", line 1
        type A = (x := 3)
                  ^^^^^^
    SyntaxError: named expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1955, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[358]>", line 1
        type A = (yield 3)
                  ^^^^^^^
    SyntaxError: yield expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1960, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[359]>", line 1
        type A = (await 3)
                  ^^^^^^^
    SyntaxError: await expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1965, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[360]>", line 1
        type A = (yield from [])
                  ^^^^^^^^^^^^^
    SyntaxError: yield expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1970, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[361]>", line 1
        class A[T]((x := 3)): ...
                    ^^^^^^
    SyntaxError: named expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1975, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[362]>", line 1
        class A[T]((yield 3)): ...
                    ^^^^^^^
    SyntaxError: yield expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1980, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[363]>", line 1
        class A[T]((await 3)): ...
                    ^^^^^^^
    SyntaxError: await expression cannot be used within an annotation scope
----------------------------------------------------------------------
File "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/test/test_syntax.py", line 1985, 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 "/build_dir/pypy-c-jit-linux-aarch64/build/lib-python/3/doctest.py", line 1368, in __run
        exec(compile(example.source, filename, "single",
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<doctest test.test_syntax[364]>", line 1
        class A[T]((yield from [])): ...
                    ^^^^^^^^^^^^^
    SyntaxError: yield expression cannot be used within an annotation scope


----------------------------------------------------------------------
Ran 38 tests in 0.360s

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

== Tests result: FAILURE ==

1 test failed:
    test_syntax

Total duration: 590 ms
Total tests: run=38 failures=4 skipped=7
Total test files: run=1/1 failed=1
Result: FAILURE
test test_syntax failed
builder: pypy-c-jit-linux-aarch64 build #2946+
test: lib-python/3/test/test_syntax.py::unmodified