lib-python/3/test/test_descr.py::unmodified
== PyPy 3.12.13 (f591fa0fd4db, Jul 06 2026, 20:11:58) [PyPy 7.3.24-alpha0 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
== Linux-6.1.0-22-amd64-x86_64-with-glibc2.17 little-endian
== Python build: release with_assert
== cwd: /tmp/pytest/test_python_worker_3641242æ
== CPU count: 4
== encodings: locale=UTF-8 FS=utf-8
== resources (3): curses,gui,network
Using random seed: 3471389943
0:00:00 load avg: 1.02 Run 1 test sequentially in a single process
0:00:00 load avg: 1.02 [1/1] test_descr
test_pytype_long_ready (test.test_descr.AAAPTypesLongInitTest.test_pytype_long_ready) ... ok
test_abstractmethods (test.test_descr.ClassPropertiesAndMethods.test_abstractmethods) ... ok
test_altmro (test.test_descr.ClassPropertiesAndMethods.test_altmro) ... ok
test_assign_slice (test.test_descr.ClassPropertiesAndMethods.test_assign_slice) ... ok
test_attr_raise_through_property (test.test_descr.ClassPropertiesAndMethods.test_attr_raise_through_property) ... ok
test_bad_new (test.test_descr.ClassPropertiesAndMethods.test_bad_new) ... unexpected success
test_basic_inheritance (test.test_descr.ClassPropertiesAndMethods.test_basic_inheritance) ... ok
test_binary_operator_override (test.test_descr.ClassPropertiesAndMethods.test_binary_operator_override) ... ok
test_bound_method_repr (test.test_descr.ClassPropertiesAndMethods.test_bound_method_repr) ... ok
test_bpo25750 (test.test_descr.ClassPropertiesAndMethods.test_bpo25750) ... skipped 'need the _testcapi module'
test_buffer_inheritance (test.test_descr.ClassPropertiesAndMethods.test_buffer_inheritance) ... ok
test_builtin_bases (test.test_descr.ClassPropertiesAndMethods.test_builtin_bases) ... ok
test_builtin_function_or_method (test.test_descr.ClassPropertiesAndMethods.test_builtin_function_or_method) ... ok
test_carloverre (test.test_descr.ClassPropertiesAndMethods.test_carloverre) ... ok
test_carloverre_multi_inherit_invalid (test.test_descr.ClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid) ... FAIL
test_carloverre_multi_inherit_valid (test.test_descr.ClassPropertiesAndMethods.test_carloverre_multi_inherit_valid) ... ok
test_classic (test.test_descr.ClassPropertiesAndMethods.test_classic) ... ok
test_classic_comparisons (test.test_descr.ClassPropertiesAndMethods.test_classic_comparisons) ... ok
test_classmethods (test.test_descr.ClassPropertiesAndMethods.test_classmethods) ... ok
test_classmethods_in_c (test.test_descr.ClassPropertiesAndMethods.test_classmethods_in_c) ... skipped "the module 'xxsubtype' is internal"
test_compattr (test.test_descr.ClassPropertiesAndMethods.test_compattr) ... ok
test_consistency_with_epg (test.test_descr.ClassPropertiesAndMethods.test_consistency_with_epg) ... ok
test_copy_setstate (test.test_descr.ClassPropertiesAndMethods.test_copy_setstate) ... ok
test_cycle_through_dict (test.test_descr.ClassPropertiesAndMethods.test_cycle_through_dict) ... ok
test_deepcopy_recursive (test.test_descr.ClassPropertiesAndMethods.test_deepcopy_recursive) ... ok
test_delete_hook (test.test_descr.ClassPropertiesAndMethods.test_delete_hook) ... ok
test_descrdoc (test.test_descr.ClassPropertiesAndMethods.test_descrdoc) ... ok
test_diamond_inheritance (test.test_descr.ClassPropertiesAndMethods.test_diamond_inheritance) ... ok
test_dict_constructors (test.test_descr.ClassPropertiesAndMethods.test_dict_constructors) ... ok
test_dir (test.test_descr.ClassPropertiesAndMethods.test_dir) ... ok
test_doc_descriptor (test.test_descr.ClassPropertiesAndMethods.test_doc_descriptor) ... ok
test_dynamics (test.test_descr.ClassPropertiesAndMethods.test_dynamics) ... ok
test_errors (test.test_descr.ClassPropertiesAndMethods.test_errors) ... ok
test_evil_type_name (test.test_descr.ClassPropertiesAndMethods.test_evil_type_name) ... ok
test_ex5_from_c3_switch (test.test_descr.ClassPropertiesAndMethods.test_ex5_from_c3_switch) ... ok
test_file_fault (test.test_descr.ClassPropertiesAndMethods.test_file_fault) ... ok
test_funny_new (test.test_descr.ClassPropertiesAndMethods.test_funny_new) ... ok
test_getattr_hooks (test.test_descr.ClassPropertiesAndMethods.test_getattr_hooks) ... ok
test_hash_inheritance (test.test_descr.ClassPropertiesAndMethods.test_hash_inheritance) ... ok
test_imul_bug (test.test_descr.ClassPropertiesAndMethods.test_imul_bug) ... ok
test_init (test.test_descr.ClassPropertiesAndMethods.test_init) ... ok
test_ipow (test.test_descr.ClassPropertiesAndMethods.test_ipow) ... ok
test_ipow_exception_text (test.test_descr.ClassPropertiesAndMethods.test_ipow_exception_text) ... ok
test_ipow_returns_not_implemented (test.test_descr.ClassPropertiesAndMethods.test_ipow_returns_not_implemented) ... ok
test_isinst_isclass (test.test_descr.ClassPropertiesAndMethods.test_isinst_isclass) ... ok
test_keyword_arguments (test.test_descr.ClassPropertiesAndMethods.test_keyword_arguments) ... ok
test_keywords (test.test_descr.ClassPropertiesAndMethods.test_keywords) ... ok
test_load_attr_extended_arg (test.test_descr.ClassPropertiesAndMethods.test_load_attr_extended_arg) ... ok
test_metaclass (test.test_descr.ClassPropertiesAndMethods.test_metaclass) ... ok
test_meth_class_get (test.test_descr.ClassPropertiesAndMethods.test_meth_class_get) ... skipped 'testing an internal kind of method object'
test_method_wrapper (test.test_descr.ClassPropertiesAndMethods.test_method_wrapper) ... ok
test_methods (test.test_descr.ClassPropertiesAndMethods.test_methods) ... ok
test_methods_in_c (test.test_descr.ClassPropertiesAndMethods.test_methods_in_c) ... skipped 'testing error message from implementation'
test_mixing_slot_wrappers (test.test_descr.ClassPropertiesAndMethods.test_mixing_slot_wrappers) ... ok
test_module_subclasses (test.test_descr.ClassPropertiesAndMethods.test_module_subclasses) ... ok
test_monotonicity (test.test_descr.ClassPropertiesAndMethods.test_monotonicity) ... ok
test_mro_disagreement (test.test_descr.ClassPropertiesAndMethods.test_mro_disagreement) ... ok
test_multiple_inheritance (test.test_descr.ClassPropertiesAndMethods.test_multiple_inheritance) ... ok
test_mutable_bases (test.test_descr.ClassPropertiesAndMethods.test_mutable_bases) ... ok
test_mutable_bases_catch_mro_conflict (test.test_descr.ClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict) ... ok
test_mutable_bases_with_failing_mro (test.test_descr.ClassPropertiesAndMethods.test_mutable_bases_with_failing_mro) ... ok
test_mutable_names (test.test_descr.ClassPropertiesAndMethods.test_mutable_names) ... ok
test_newslots (test.test_descr.ClassPropertiesAndMethods.test_newslots) ... ok
test_no_ipow (test.test_descr.ClassPropertiesAndMethods.test_no_ipow) ... ok
test_not_implemented (test.test_descr.ClassPropertiesAndMethods.test_not_implemented) ... ok
test_object_class (test.test_descr.ClassPropertiesAndMethods.test_object_class) ... ok
test_object_class_assignment_between_heaptypes_and_nonheaptypes (test.test_descr.ClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes) ... ok
test_object_new (test.test_descr.ClassPropertiesAndMethods.test_object_new) ... ok
test_object_new_and_init_with_parameters (test.test_descr.ClassPropertiesAndMethods.test_object_new_and_init_with_parameters) ... ok
test_overloading (test.test_descr.ClassPropertiesAndMethods.test_overloading) ... ok
test_properties (test.test_descr.ClassPropertiesAndMethods.test_properties) ... ok
test_properties_doc_attrib (test.test_descr.ClassPropertiesAndMethods.test_properties_doc_attrib) ... ok
test_properties_plus (test.test_descr.ClassPropertiesAndMethods.test_properties_plus) ... ok
test_proxy_call (test.test_descr.ClassPropertiesAndMethods.test_proxy_call) ... ok
test_proxy_super (test.test_descr.ClassPropertiesAndMethods.test_proxy_super) ... ok
test_python_dicts (test.test_descr.ClassPropertiesAndMethods.test_python_dicts) ... ok
test_python_lists (test.test_descr.ClassPropertiesAndMethods.test_python_lists) ... ok
test_qualname (test.test_descr.ClassPropertiesAndMethods.test_qualname) ... FAIL
test_qualname_dict (test.test_descr.ClassPropertiesAndMethods.test_qualname_dict) ... ok
test_recursive_call (test.test_descr.ClassPropertiesAndMethods.test_recursive_call) ... ok
test_refleaks_in_classmethod___init__ (test.test_descr.ClassPropertiesAndMethods.test_refleaks_in_classmethod___init__) ... skipped 'implementation detail specific to cpython'
test_refleaks_in_staticmethod___init__ (test.test_descr.ClassPropertiesAndMethods.test_refleaks_in_staticmethod___init__) ... skipped 'implementation detail specific to cpython'
test_remove_subclass (test.test_descr.ClassPropertiesAndMethods.test_remove_subclass) ... ok
test_repr_as_str (test.test_descr.ClassPropertiesAndMethods.test_repr_as_str) ... ok
test_repr_with_module_str_subclass (test.test_descr.ClassPropertiesAndMethods.test_repr_with_module_str_subclass) ... ok
test_restored_object_new (test.test_descr.ClassPropertiesAndMethods.test_restored_object_new) ... unexpected success
test_rich_comparisons (test.test_descr.ClassPropertiesAndMethods.test_rich_comparisons) ... ok
test_rmul (test.test_descr.ClassPropertiesAndMethods.test_rmul) ... ok
test_set_and_no_get (test.test_descr.ClassPropertiesAndMethods.test_set_and_no_get) ... ok
test_set_class (test.test_descr.ClassPropertiesAndMethods.test_set_class) ... ok
test_set_dict (test.test_descr.ClassPropertiesAndMethods.test_set_dict) ... FAIL
test_set_doc (test.test_descr.ClassPropertiesAndMethods.test_set_doc) ... ERROR
test_slices (test.test_descr.ClassPropertiesAndMethods.test_slices) ... ok
test_slot_shadows_class_variable (test.test_descr.ClassPropertiesAndMethods.test_slot_shadows_class_variable) ... ok
test_slots (test.test_descr.ClassPropertiesAndMethods.test_slots) ... FAIL
test_slots_descriptor (test.test_descr.ClassPropertiesAndMethods.test_slots_descriptor) ... ok
test_slots_multiple_inheritance (test.test_descr.ClassPropertiesAndMethods.test_slots_multiple_inheritance) ... ok
test_slots_special (test.test_descr.ClassPropertiesAndMethods.test_slots_special) ... ok
test_slots_special2 (test.test_descr.ClassPropertiesAndMethods.test_slots_special2) ... FAIL
test_slots_trash (test.test_descr.ClassPropertiesAndMethods.test_slots_trash) ... ok
test_special_method_lookup (test.test_descr.ClassPropertiesAndMethods.test_special_method_lookup) ... ERROR
test_special_unbound_method_types (test.test_descr.ClassPropertiesAndMethods.test_special_unbound_method_types) ... ok
test_specialized_method_calls_check_types (test.test_descr.ClassPropertiesAndMethods.test_specialized_method_calls_check_types) ... ok
test_specials (test.test_descr.ClassPropertiesAndMethods.test_specials) ... ok
test_staticmethods (test.test_descr.ClassPropertiesAndMethods.test_staticmethods) ... ok
test_staticmethods_in_c (test.test_descr.ClassPropertiesAndMethods.test_staticmethods_in_c) ... skipped "the module 'xxsubtype' is internal"
test_str_of_str_subclass (test.test_descr.ClassPropertiesAndMethods.test_str_of_str_subclass) ... ok
test_str_operations (test.test_descr.ClassPropertiesAndMethods.test_str_operations) ... ok
test_str_subclass_as_dict_key (test.test_descr.ClassPropertiesAndMethods.test_str_subclass_as_dict_key) ... ok
test_subclass_propagation (test.test_descr.ClassPropertiesAndMethods.test_subclass_propagation) ... ok
test_subclass_right_op (test.test_descr.ClassPropertiesAndMethods.test_subclass_right_op) ... ok
test_subclassing_does_not_duplicate_dict_descriptors (test.test_descr.ClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors) ... ok
test_subtype_resurrection (test.test_descr.ClassPropertiesAndMethods.test_subtype_resurrection) ... ok
test_supers (test.test_descr.ClassPropertiesAndMethods.test_supers) ... ok
test_testcapi_no_segfault (test.test_descr.ClassPropertiesAndMethods.test_testcapi_no_segfault) ... skipped 'implementation detail specific to cpython'
test_type___getattribute__ (test.test_descr.ClassPropertiesAndMethods.test_type___getattribute__) ... ok
test_uninitialized_modules (test.test_descr.ClassPropertiesAndMethods.test_uninitialized_modules) ... ok
test_unsubclassable_types (test.test_descr.ClassPropertiesAndMethods.test_unsubclassable_types) ... ok
test_vicious_descriptor_nonsense (test.test_descr.ClassPropertiesAndMethods.test_vicious_descriptor_nonsense) ... ok
test_weakref_segfault (test.test_descr.ClassPropertiesAndMethods.test_weakref_segfault) ... ok
test_weakrefs (test.test_descr.ClassPropertiesAndMethods.test_weakrefs) ... FAIL
test_wrapper_segfault (test.test_descr.ClassPropertiesAndMethods.test_wrapper_segfault) ... skipped "resource 'cpu' is not enabled"
test_wrong_class_slot_wrapper (test.test_descr.ClassPropertiesAndMethods.test_wrong_class_slot_wrapper) ... ok
test_dict_type_with_metaclass (test.test_descr.DictProxyTests.test_dict_type_with_metaclass) ... ok
test_iter_items (test.test_descr.DictProxyTests.test_iter_items) ... ok
test_iter_keys (test.test_descr.DictProxyTests.test_iter_keys) ... ok
test_iter_values (test.test_descr.DictProxyTests.test_iter_values) ... ok
test_repr (test.test_descr.DictProxyTests.test_repr) ... ok
test_type_lookup_mro_reference (test.test_descr.MiscTests.test_type_lookup_mro_reference) ... ERROR
test_disappearing_custom_mro (test.test_descr.MroTest.test_disappearing_custom_mro)
gh-92112: A custom mro() returning a result conflicting with ... ok
test_incomplete_extend (test.test_descr.MroTest.test_incomplete_extend)
Extending an uninitialized type with type->tp_mro == NULL must ... ok
test_incomplete_set_bases_on_self (test.test_descr.MroTest.test_incomplete_set_bases_on_self)
type_set_bases must be aware that type->tp_mro can be NULL. ... ok
test_incomplete_super (test.test_descr.MroTest.test_incomplete_super)
Attribute lookup on a super object must be aware that ... ok
test_reent_set_bases_on_base (test.test_descr.MroTest.test_reent_set_bases_on_base)
Deep reentrancy must not over-decref old_mro. ... ok
test_reent_set_bases_on_direct_base (test.test_descr.MroTest.test_reent_set_bases_on_direct_base)
Similar to test_reent_set_bases_on_base, but may crash differently. ... ok
test_reent_set_bases_tp_base_cycle (test.test_descr.MroTest.test_reent_set_bases_tp_base_cycle)
type_set_bases must check for an inheritance cycle not only through ... ok
test_tp_subclasses_cycle_error_return_path (test.test_descr.MroTest.test_tp_subclasses_cycle_error_return_path)
The same as test_tp_subclasses_cycle_in_update_slots, but tests ... ok
test_tp_subclasses_cycle_in_update_slots (test.test_descr.MroTest.test_tp_subclasses_cycle_in_update_slots)
type_set_bases must check for reentrancy upon finishing its job ... ok
test_complexes (test.test_descr.OperatorsTest.test_complexes) ... ok
test_dicts (test.test_descr.OperatorsTest.test_dicts) ... ok
test_explicit_reverse_methods (test.test_descr.OperatorsTest.test_explicit_reverse_methods) ... ok
test_floats (test.test_descr.OperatorsTest.test_floats) ... ok
test_ints (test.test_descr.OperatorsTest.test_ints) ... ok
test_lists (test.test_descr.OperatorsTest.test_lists) ... ok
test_spam_dicts (test.test_descr.OperatorsTest.test_spam_dicts) ... skipped "the module 'xxsubtype' is internal"
test_spam_lists (test.test_descr.OperatorsTest.test_spam_lists) ... skipped "the module 'xxsubtype' is internal"
test_wrap_lenfunc_bad_cast (test.test_descr.OperatorsTest.test_wrap_lenfunc_bad_cast) ... ok
test_issue24097 (test.test_descr.PicklingTests.test_issue24097) ... ok
test_object_reduce (test.test_descr.PicklingTests.test_object_reduce) ... ok
test_pickle_slots (test.test_descr.PicklingTests.test_pickle_slots) ... ok
test_reduce (test.test_descr.PicklingTests.test_reduce) ... ok
test_reduce_copying (test.test_descr.PicklingTests.test_reduce_copying) ... ok
test_special_method_lookup (test.test_descr.PicklingTests.test_special_method_lookup) ... ok
test_subclasses (test.test_descr.SharedKeyTests.test_subclasses) ... skipped 'implementation detail specific to cpython'
======================================================================
ERROR: test_set_doc (test.test_descr.ClassPropertiesAndMethods.test_set_doc)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_descr.py", line 4836, in test_set_doc
type(X).__dict__["__doc__"].__delete__(X)
^^^^^^^^^^
AttributeError: cannot delete '__doc__' attribute of immutable type 'X'
======================================================================
ERROR: test_special_method_lookup (test.test_descr.ClassPropertiesAndMethods.test_special_method_lookup)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_descr.py", line 2123, in test_special_method_lookup
runner(X())
TypeError: getsizeof(...)
getsizeof(object, default) -> int
Return the size of object in bytes.
sys.getsizeof(object, default) will always return default on PyPy, and
raise a TypeError if default is not provided.
First note that the CPython documentation says that this function may
raise a TypeError, so if you are seeing it, it means that the program
you are using is not correctly handling this case.
On PyPy, though, it always raises TypeError. Before looking for
alternatives, please take a moment to read the following explanation as
to why it is the case. What you are looking for may not be possible.
A memory profiler using this function is most likely to give results
inconsistent with reality on PyPy. It would be possible to have
sys.getsizeof() return a number (with enough work), but that may or
may not represent how much memory the object uses. It doesn't even
make really sense to ask how much *one* object uses, in isolation
with the rest of the system. For example, instances have maps,
which are often shared across many instances; in this case the maps
would probably be ignored by an implementation of sys.getsizeof(),
but their overhead is important in some cases if they are many
instances with unique maps. Conversely, equal strings may share
their internal string data even if they are different objects---or
empty containers may share parts of their internals as long as they
are empty. Even stranger, some lists create objects as you read
them; if you try to estimate the size in memory of range(10**6) as
the sum of all items' size, that operation will by itself create one
million integer objects that never existed in the first place.
======================================================================
ERROR: test_type_lookup_mro_reference (test.test_descr.MiscTests.test_type_lookup_mro_reference)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_descr.py", line 5145, in test_type_lookup_mro_reference
X = type('X', (Base,), {MyKey(): 5})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected str, got MyKey object
======================================================================
FAIL: test_carloverre_multi_inherit_invalid (test.test_descr.ClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_descr.py", line 4436, in test_carloverre_multi_inherit_invalid
self.fail("setattr through indirect base types should be rejected")
^^^^
AssertionError: setattr through indirect base types should be rejected
======================================================================
FAIL: test_qualname (test.test_descr.ClassPropertiesAndMethods.test_qualname)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_descr.py", line 4846, in test_qualname
self.assertEqual(type(d).__name__, n + '_descriptor')
^^^^^^^^^^^
AssertionError: 'function' != 'method_descriptor'
- function
+ method_descriptor
======================================================================
FAIL: test_set_dict (test.test_descr.ClassPropertiesAndMethods.test_set_dict)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_descr.py", line 3411, in test_set_dict
self.fail("%r's __dict__ can be modified" % cls)
^^^^
AssertionError: <class 'test.test_descr.ClassPropertiesAndMethods.test_set_dict.<locals>.E'>'s __dict__ can be modified
======================================================================
FAIL: test_slots (test.test_descr.ClassPropertiesAndMethods.test_slots)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_descr.py", line 1287, in test_slots
self.assertEqual(orig_objects, new_objects)
^^^^^^^^^^^
AssertionError: 63504 != 63506
======================================================================
FAIL: test_slots_special2 (test.test_descr.ClassPropertiesAndMethods.test_slots_special2)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_descr.py", line 1374, in test_slots_special2
self.assertIsInstance(C2.__dict__["__classcell__"],
^^^^^^^^^^^^^^^^
AssertionError: <member_descriptor object at 0x00007fdb34356300> is not an instance of <class 'getset_descriptor'>
======================================================================
FAIL: test_weakrefs (test.test_descr.ClassPropertiesAndMethods.test_weakrefs)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_descr.py", line 2259, in test_weakrefs
self.fail("weakref.ref(no) should be illegal")
^^^^
AssertionError: weakref.ref(no) should be illegal
======================================================================
UNEXPECTED SUCCESS: test_bad_new (test.test_descr.ClassPropertiesAndMethods.test_bad_new)
UNEXPECTED SUCCESS: test_restored_object_new (test.test_descr.ClassPropertiesAndMethods.test_restored_object_new)
----------------------------------------------------------------------
Ran 154 tests in 0.565s
FAILED (failures=6, errors=3, skipped=12, unexpected successes=2)
0:00:00 load avg: 1.01 [1/1/1] test_descr failed (3 errors, 6 failures)
== Tests result: FAILURE ==
1 test failed:
test_descr
Total duration: 714 ms
Total tests: run=154 failures=6 skipped=12
Total test files: run=1/1 failed=1
Result: FAILURE
test test_descr failed
builder: pypy-c-jit-linux-x86-64 build #11848+
test: lib-python/3/test/test_descr.py::unmodified