Currently all tests for PyWeakref_* C API are implemented in a single C function test_weakref_capi() in Modules/_testcapimodule.c. it is not easy to add new tests, also the failure report is not very informative. The following PR adds separate module test.test_capi.test_weakref and wrappers in _testcapi and _testlimitedcapi modules to write tests in Python.
Linked PRs
Currently all tests for
PyWeakref_*C API are implemented in a single C functiontest_weakref_capi()inModules/_testcapimodule.c. it is not easy to add new tests, also the failure report is not very informative. The following PR adds separate moduletest.test_capi.test_weakrefand wrappers in_testcapiand_testlimitedcapimodules to write tests in Python.Linked PRs