Closed
Description
Bug report
Bug description:
eclips4@nixos ~/p/p/cpython (main) [2]> ./python Lib/test/test_weakref.py
..................................................................................F....F.................................................
======================================================================
FAIL: test_proxy_repr (__main__.ReferencesTestCase.test_proxy_repr)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/eclips4/programming/programming-languages/cpython/Lib/test/test_weakref.py", line 232, in test_proxy_repr
self.assertRegex(repr(ref),
~~~~~~~~~~~~~~~~^^^^^^^^^^^
rf"<weakproxy at 0x[0-9a-fA-F]+; "
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rf"to '{C.__module__}.{C.__qualname__}' "
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rf"at 0x[0-9a-fA-F]+>")
^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Regex didn't match: "<weakproxy at 0x[0-9a-fA-F]+; to '__main__.C' at 0x[0-9a-fA-F]+>" not found in "<weakproxy at 0x7ff9bb9e5ef0; to 'C' at 0x7ff9bbbdcd80>"
======================================================================
FAIL: test_ref_repr (__main__.ReferencesTestCase.test_ref_repr)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/eclips4/programming/programming-languages/cpython/Lib/test/test_weakref.py", line 126, in test_ref_repr
self.assertRegex(repr(ref),
~~~~~~~~~~~~~~~~^^^^^^^^^^^
rf"<weakref at 0x[0-9a-fA-F]+; "
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rf"to '{C.__module__}.{C.__qualname__}' "
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rf"at 0x[0-9a-fA-F]+>")
^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Regex didn't match: "<weakref at 0x[0-9a-fA-F]+; to '__main__.C' at 0x[0-9a-fA-F]+>" not found in "<weakref at 0x7ff9bb9e7230; to 'C' at 0x7ff9bb9e7d30>"
----------------------------------------------------------------------
Ran 137 tests in 25.733s
FAILED (failures=2)
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux