This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Move tests from setobject.c to _testcapimodule
Type: enhancement Stage: patch review
Components: C API, Tests Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: arhadthedev, rhettinger
Priority: normal Keywords: patch

Created on 2022-03-26 19:16 by arhadthedev, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 32133 open arhadthedev, 2022-03-26 19:28
Messages (1)
msg416083 - (view) Author: Oleg Iarygin (arhadthedev) * Date: 2022-03-26 19:16
Currently, tests for PySet/PyFrozenSet C API are defined in Objects/setobject.c and available via set.test_c_api().

Moving them to, for example, _testcapimodule gives the following advantanges:

- an internal, CPython-specific method stops being available in a public interface of the set class

- CPython already has tests grouped into dedicated packages

- the target package undefines NDEBUG thus making asserts available in release builds

- a user may choose to omit the tests from a build not carrying them around

- a file of 2.5k lines of codes becomes 152 lines smaller.
History
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91288
2022-03-27 04:32:59Dennis Sweeneysetnosy: + rhettinger
2022-03-26 19:28:05arhadthedevsetkeywords: + patch
stage: patch review
pull_requests: + pull_request30213
2022-03-26 19:16:33arhadthedevcreate