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

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

== PyPy 3.12.13 (421004c42b8a, Aug 21 2026, 03:33:31) [PyPy 8.0.0-alpha0 with GCC 14.2.1 20250110 (Red Hat 14.2.1-11)]
== Linux-6.1.0-22-amd64-x86_64-with-glibc2.28 little-endian
== Python build: release with_assert
== cwd: /tmp/pytest/test_python_worker_211452æ
== CPU count: 4
== encodings: locale=UTF-8 FS=utf-8
== resources (3): curses,gui,network

Using random seed: 800922977
0:00:00 load avg: 1.55 Run 1 test sequentially in a single process
0:00:00 load avg: 1.55 [1/1] test_type_params
test_types_new_class_no_callback (test.test_type_params.DynamicClassTest.test_types_new_class_no_callback) ... ok
test_types_new_class_with_callback (test.test_type_params.DynamicClassTest.test_types_new_class_with_callback) ... ok
test_class_access_01 (test.test_type_params.TypeParamsAccessTest.test_class_access_01) ... ok
test_class_access_02 (test.test_type_params.TypeParamsAccessTest.test_class_access_02) ... ok
test_class_access_03 (test.test_type_params.TypeParamsAccessTest.test_class_access_03) ... ok
test_class_base_containing_lambda (test.test_type_params.TypeParamsAccessTest.test_class_base_containing_lambda) ... ok
test_class_deref (test.test_type_params.TypeParamsAccessTest.test_class_deref) ... ok
test_class_scope_interaction_01 (test.test_type_params.TypeParamsAccessTest.test_class_scope_interaction_01) ... ok
test_class_scope_interaction_02 (test.test_type_params.TypeParamsAccessTest.test_class_scope_interaction_02) ... ok
test_comprehension_01 (test.test_type_params.TypeParamsAccessTest.test_comprehension_01) ... ok
test_comprehension_02 (test.test_type_params.TypeParamsAccessTest.test_comprehension_02) ... ok
test_function_access_01 (test.test_type_params.TypeParamsAccessTest.test_function_access_01) ... ok
test_function_access_02 (test.test_type_params.TypeParamsAccessTest.test_function_access_02) ... ok
test_function_access_03 (test.test_type_params.TypeParamsAccessTest.test_function_access_03) ... ok
test_gen_exp_in_generic_method (test.test_type_params.TypeParamsAccessTest.test_gen_exp_in_generic_method) ... ok
test_gen_exp_in_nested_class (test.test_type_params.TypeParamsAccessTest.test_gen_exp_in_nested_class) ... ok
test_gen_exp_in_nested_generic_class (test.test_type_params.TypeParamsAccessTest.test_gen_exp_in_nested_generic_class) ... ok
test_listcomp_in_nested_class (test.test_type_params.TypeParamsAccessTest.test_listcomp_in_nested_class) ... ok
test_listcomp_in_nested_generic_class (test.test_type_params.TypeParamsAccessTest.test_listcomp_in_nested_generic_class) ... ok
test_method_access_01 (test.test_type_params.TypeParamsAccessTest.test_method_access_01) ... ok
test_nested_access_01 (test.test_type_params.TypeParamsAccessTest.test_nested_access_01) ... ok
test_nested_scope_in_generic_alias (test.test_type_params.TypeParamsAccessTest.test_nested_scope_in_generic_alias) ... ok
test_out_of_scope_01 (test.test_type_params.TypeParamsAccessTest.test_out_of_scope_01) ... ok
test_out_of_scope_02 (test.test_type_params.TypeParamsAccessTest.test_out_of_scope_02) ... ok
test_reference_previous_typevar (test.test_type_params.TypeParamsAccessTest.test_reference_previous_typevar) ... ok
test_shadowing_nonlocal (test.test_type_params.TypeParamsAccessTest.test_shadowing_nonlocal) ... ok
test_super (test.test_type_params.TypeParamsAccessTest.test_super) ... ok
test_type_alias_containing_lambda (test.test_type_params.TypeParamsAccessTest.test_type_alias_containing_lambda) ... ok
test_type_special_case (test.test_type_params.TypeParamsAccessTest.test_type_special_case) ... FAIL
test_alias (test.test_type_params.TypeParamsClassScopeTest.test_alias) ... ok
test_binding_uses_global (test.test_type_params.TypeParamsClassScopeTest.test_binding_uses_global) ... ok
test_bound (test.test_type_params.TypeParamsClassScopeTest.test_bound) ... ok
test_explicit_global (test.test_type_params.TypeParamsClassScopeTest.test_explicit_global) ... ok
test_explicit_global_with_assignment (test.test_type_params.TypeParamsClassScopeTest.test_explicit_global_with_assignment) ... ok
test_explicit_global_with_no_static_bound (test.test_type_params.TypeParamsClassScopeTest.test_explicit_global_with_no_static_bound) ... ok
test_explicit_nonlocal (test.test_type_params.TypeParamsClassScopeTest.test_explicit_nonlocal) ... ok
test_modified_later (test.test_type_params.TypeParamsClassScopeTest.test_modified_later) ... FAIL
test_nested_free (test.test_type_params.TypeParamsClassScopeTest.test_nested_free) ... ERROR
test_no_binding_uses_nonlocal (test.test_type_params.TypeParamsClassScopeTest.test_no_binding_uses_nonlocal) ... ok
test_complex_base (test.test_type_params.TypeParamsComplexCallsTest.test_complex_base) ... ok
test_defaults (test.test_type_params.TypeParamsComplexCallsTest.test_defaults) ... ok
test_starargs_base (test.test_type_params.TypeParamsComplexCallsTest.test_starargs_base) ... ok
test_disallowed_expressions (test.test_type_params.TypeParamsInvalidTest.test_disallowed_expressions) ... ok
test_incorrect_mro_explicit_object (test.test_type_params.TypeParamsInvalidTest.test_incorrect_mro_explicit_object) ... FAIL
test_name_collisions (test.test_type_params.TypeParamsInvalidTest.test_name_collisions) ... ok
test_name_non_collision_02 (test.test_type_params.TypeParamsInvalidTest.test_name_non_collision_02) ... ok
test_name_non_collision_03 (test.test_type_params.TypeParamsInvalidTest.test_name_non_collision_03) ... ok
test_name_non_collision_04 (test.test_type_params.TypeParamsInvalidTest.test_name_non_collision_04) ... ok
test_name_non_collision_05 (test.test_type_params.TypeParamsInvalidTest.test_name_non_collision_05) ... ok
test_name_non_collision_06 (test.test_type_params.TypeParamsInvalidTest.test_name_non_collision_06) ... ok
test_name_non_collision_07 (test.test_type_params.TypeParamsInvalidTest.test_name_non_collision_07) ... ok
test_name_non_collision_08 (test.test_type_params.TypeParamsInvalidTest.test_name_non_collision_08) ... ok
test_name_non_collision_10 (test.test_type_params.TypeParamsInvalidTest.test_name_non_collision_10) ... ok
test_name_non_collision_13 (test.test_type_params.TypeParamsInvalidTest.test_name_non_collision_13) ... ok
test_name_non_collision_9 (test.test_type_params.TypeParamsInvalidTest.test_name_non_collision_9) ... ok
test_evaluation_error (test.test_type_params.TypeParamsLazyEvaluationTest.test_evaluation_error) ... ok
test_qualname (test.test_type_params.TypeParamsLazyEvaluationTest.test_qualname) ... ok
test_recursive_class (test.test_type_params.TypeParamsLazyEvaluationTest.test_recursive_class) ... ok
test_mangling (test.test_type_params.TypeParamsManglingTest.test_mangling) ... ERROR
test_no_leaky_mangling_in_class (test.test_type_params.TypeParamsManglingTest.test_no_leaky_mangling_in_class) ... ok
test_no_leaky_mangling_in_function (test.test_type_params.TypeParamsManglingTest.test_no_leaky_mangling_in_function) ... ok
test_no_leaky_mangling_in_module (test.test_type_params.TypeParamsManglingTest.test_no_leaky_mangling_in_module) ... ok
test_no_mangling_in_bases (test.test_type_params.TypeParamsManglingTest.test_no_mangling_in_bases) ... ok
test_no_mangling_in_nested_scopes (test.test_type_params.TypeParamsManglingTest.test_no_mangling_in_nested_scopes) ... ok
test_type_params_are_mangled (test.test_type_params.TypeParamsManglingTest.test_type_params_are_mangled) ... ERROR
test_nonlocal_allowed (test.test_type_params.TypeParamsNonlocalTest.test_nonlocal_allowed) ... ok
test_nonlocal_disallowed_01 (test.test_type_params.TypeParamsNonlocalTest.test_nonlocal_disallowed_01) ... ok
test_nonlocal_disallowed_02 (test.test_type_params.TypeParamsNonlocalTest.test_nonlocal_disallowed_02) ... ok
test_nonlocal_disallowed_03 (test.test_type_params.TypeParamsNonlocalTest.test_nonlocal_disallowed_03) ... ok
test_pickling_classes (test.test_type_params.TypeParamsPickleTest.test_pickling_classes) ... ok
test_pickling_functions (test.test_type_params.TypeParamsPickleTest.test_pickling_functions) ... ok
test_broken_class_namespace (test.test_type_params.TypeParamsRuntimeTest.test_broken_class_namespace) ... ok
test_name_error (test.test_type_params.TypeParamsRuntimeTest.test_name_error) ... ok
test_traditional_01 (test.test_type_params.TypeParamsTraditionalTypeVarsTest.test_traditional_01) ... ok
test_traditional_02 (test.test_type_params.TypeParamsTraditionalTypeVarsTest.test_traditional_02) ... ok
test_traditional_03 (test.test_type_params.TypeParamsTraditionalTypeVarsTest.test_traditional_03) ... ok
test_typeparams_dunder_class_01 (test.test_type_params.TypeParamsTypeParamsDunder.test_typeparams_dunder_class_01) ... ok
test_typeparams_dunder_class_02 (test.test_type_params.TypeParamsTypeParamsDunder.test_typeparams_dunder_class_02) ... ok
test_typeparams_dunder_class_03 (test.test_type_params.TypeParamsTypeParamsDunder.test_typeparams_dunder_class_03) ... ok
test_typeparams_dunder_function_01 (test.test_type_params.TypeParamsTypeParamsDunder.test_typeparams_dunder_function_01) ... ok
test_typeparams_dunder_function_02 (test.test_type_params.TypeParamsTypeParamsDunder.test_typeparams_dunder_function_02) ... ok
test_typeparams_dunder_function_03 (test.test_type_params.TypeParamsTypeParamsDunder.test_typeparams_dunder_function_03) ... ok
test_paramspec_01 (test.test_type_params.TypeParamsTypeVarParamSpecTest.test_paramspec_01) ... ok
test_paramspec_02 (test.test_type_params.TypeParamsTypeVarParamSpecTest.test_paramspec_02) ... ok
test_typevar_01 (test.test_type_params.TypeParamsTypeVarTest.test_typevar_01) ... ok
test_typevar_coroutine (test.test_type_params.TypeParamsTypeVarTest.test_typevar_coroutine) ... ok
test_typevar_generator (test.test_type_params.TypeParamsTypeVarTest.test_typevar_generator) ... ok
test_typevartuple_01 (test.test_type_params.TypeParamsTypeVarTupleTest.test_typevartuple_01) ... ok
test_typevartuple_02 (test.test_type_params.TypeParamsTypeVarTupleTest.test_typevartuple_02) ... ok
test_weakrefs (test.test_type_params.TypeParamsWeakRefTest.test_weakrefs) ... ok

======================================================================
ERROR: test_nested_free (test.test_type_params.TypeParamsClassScopeTest.test_nested_free)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/slave/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_type_params.py", line 703, in test_nested_free
    ns = run_code("""
         ^^^^^^^^^^^^
  File "/buildbot/slave/pypy-c-jit-linux-x86-64/build/lib-python/3/test/support/__init__.py", line 665, in run_code
    exec(textwrap.dedent(code), ns)
SystemError: unexpected internal exception (please report a bug): <KeyError object at 0x7f41721229b8>; internal traceback was dumped to stderr

======================================================================
ERROR: test_mangling (test.test_type_params.TypeParamsManglingTest.test_mangling)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/slave/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_type_params.py", line 743, in test_mangling
    class Foo[__T]:
  File "/buildbot/slave/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_type_params.py", line 743, in Foo
    class Foo[__T]:
  File "/buildbot/slave/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_type_params.py", line 744, in Foo
    param = __T
            ^^^
NameError: name '_Foo__T' is not defined

======================================================================
ERROR: test_type_params_are_mangled (test.test_type_params.TypeParamsManglingTest.test_type_params_are_mangled)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/slave/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_type_params.py", line 840, in test_type_params_are_mangled
    ns = run_code("""
         ^^^^^^^^^^^^
  File "/buildbot/slave/pypy-c-jit-linux-x86-64/build/lib-python/3/test/support/__init__.py", line 665, in run_code
    exec(textwrap.dedent(code), ns)
  File "<string>", line 4, in <module>
  File "<string>", line 4, in Foo
  File "<string>", line 5, in Foo
NameError: name '_Foo__T' is not defined

======================================================================
FAIL: test_type_special_case (test.test_type_params.TypeParamsAccessTest.test_type_special_case)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/slave/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_type_params.py", line 504, in test_type_special_case
    self.assertEqual(type.__type_params__, ())
         ^^^^^^^^^^^
AssertionError: <getset_descriptor object at 0x00007f41723dd740> != ()

======================================================================
FAIL: test_modified_later (test.test_type_params.TypeParamsClassScopeTest.test_modified_later)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/slave/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_type_params.py", line 607, in test_modified_later
    self.assertIs(X.foo.__type_params__[0].__bound__, float)
         ^^^^^^^^
AssertionError: <class 'int'> is not <class 'float'>

======================================================================
FAIL: test_incorrect_mro_explicit_object (test.test_type_params.TypeParamsInvalidTest.test_incorrect_mro_explicit_object)
----------------------------------------------------------------------
TypeError: cycle among base classes: object < Generic < object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/buildbot/slave/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_type_params.py", line 152, in test_incorrect_mro_explicit_object
    with self.assertRaisesRegex(TypeError, r"\(MRO\) for bases object, Generic"):
AssertionError: "\(MRO\) for bases object, Generic" does not match "cycle among base classes: object < Generic < object"

----------------------------------------------------------------------
Ran 90 tests in 0.068s

FAILED (failures=3, errors=3)
0:00:00 load avg: 1.59 [1/1/1] test_type_params failed (3 errors, 3 failures)

== Tests result: FAILURE ==

1 test failed:
    test_type_params

Total duration: 246 ms
Total tests: run=90 failures=3
Total test files: run=1/1 failed=1
Result: FAILURE
RPython traceback:
  File "pypy_interpreter.c", line 52373, in BuiltinCode_funcrun_obj
  File "implement_11.c", line 53823, in BuiltinActivation_UwS_ObjSpace_W_Root_W_Root_W_R_20
  File "pypy_interpreter_5.c", line 18467, in PyFrame_exec_
  File "pypy_interpreter_1.c", line 18125, in PythonAstCompiler__compile_ast
  File "pypy_interpreter_astcompiler.c", line 1958, in compile_ast
  File "implement_3.c", line 2602, in dispatcher_visit_Module
  File "pypy_interpreter_astcompiler.c", line 32553, in PythonCodeGenerator__handle_body
  File "pypy_interpreter_astcompiler.c", line 14490, in PythonCodeGenerator__visit_body
  File "pypy_interpreter_astcompiler_2.c", line 7506, in _visit_function__pypy_interpreter_astcompiler_as
  File "pypy_interpreter_astcompiler_2.c", line 40724, in _make_function_body__pypy_interpreter_astcompile
  File "pypy_interpreter_astcompiler_2.c", line 15639, in PythonCodeGenerator_sub_scope
  File "pypy_interpreter_astcompiler.c", line 14490, in PythonCodeGenerator__visit_body
  File "pypy_interpreter_astcompiler_1.c", line 52257, in PythonCodeGenerator_visit_ClassDef
  File "pypy_interpreter_astcompiler_2.c", line 14984, in PythonCodeGenerator__make_class_body
  File "pypy_interpreter_astcompiler_2.c", line 15639, in PythonCodeGenerator_sub_scope
  File "pypy_interpreter_astcompiler_1.c", line 49105, in ClassCodeGenerator__compile
  File "pypy_interpreter_astcompiler.c", line 32553, in PythonCodeGenerator__handle_body
  File "pypy_interpreter_astcompiler.c", line 14490, in PythonCodeGenerator__visit_body
  File "pypy_interpreter_astcompiler_1.c", line 52668, in PythonCodeGenerator_visit_ClassDef
  File "pypy_interpreter_astcompiler_2.c", line 15639, in PythonCodeGenerator_sub_scope
  File "pypy_interpreter_astcompiler_2.c", line 45474, in GenericClassTypeParamsCodeGenerator__compile
  File "pypy_interpreter_astcompiler_2.c", line 15020, in PythonCodeGenerator__make_class_body
  File "pypy_interpreter_astcompiler_2.c", line 16424, in PythonCodeGenerator__make_function
test test_type_params failed
builder: pypy-c-jit-linux-x86-64 build #11940+
test: lib-python/3/test/test_type_params.py::unmodified