cpython/Modules/_testcapi
2023-06-12 17:45:49 +02:00
..
clinic gh-105071: add PyUnstable_Exc_PrepReraiseStar to expose except* implementation in the unstable API (#105072) 2023-05-30 15:03:36 +01:00
buffer.c
code.c
datetime.c
docstring.c
exceptions.c gh-105071: add PyUnstable_Exc_PrepReraiseStar to expose except* implementation in the unstable API (#105072) 2023-05-30 15:03:36 +01:00
float.c gh-104469 Convert _testcapi/float.c to use AC (gh-104470) 2023-05-15 12:44:00 +09:00
gc.c
getargs.c gh-105156: Deprecate the old Py_UNICODE type in C API (#105157) 2023-06-01 08:56:35 +02:00
heaptype.c gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL (GH-105386) 2023-06-12 17:45:49 +02:00
heaptype_relative.c
immortal.c
long.c gh-104469: Convert _testcapi/long to use AC (gh-104720) 2023-05-23 22:52:36 +09:00
mem.c
parts.h
pyos.c
pytime.c
README.txt gh-104469: Update README.txt for _testcapi (gh-104529) 2023-05-17 12:56:20 +09:00
structmember.c
testcapi_long.h
unicode.c gh-98836: Extend PyUnicode_FromFormat() (GH-98838) 2023-05-22 00:32:39 +03:00
vectorcall.c
vectorcall_limited.c
watchers.c gh-104469: Convert _testcapi/watchers.c to use Argument Clinic (#104503) 2023-05-15 22:59:41 +02:00

Tests in this directory are compiled into the _testcapi extension.
The main file for the extension is Modules/_testcapimodule.c, which
calls `_PyTestCapi_Init_*` from these functions.

General guideline when writing test code for C API.
* Use Argument Clinic to minimise the amount of boilerplate code.
* Add a newline between the argument spec and the docstring.
* If a test description is needed, make sure the added docstring clearly and succinctly describes purpose of the function.
* DRY, use the clone feature of Argument Clinic.
* Try to avoid adding new interned strings; reuse existing parameter names if possible. Use the `as` feature of Argument Clinic to override the C variable name, if needed.