cpython/Modules/_testcapi
2024-09-29 15:22:39 +00:00
..
clinic
abstract.c
buffer.c
bytes.c gh-121645: Add PyBytes_Join() function (#121646) 2024-08-30 12:57:33 +00:00
code.c
codec.c gh-111495: Add tests for PyCodec_* C API (#123343) 2024-09-29 15:22:39 +00:00
complex.c
config.c gh-107954, PEP 741: Add PyConfig_Get()/Set() functions (#123472) 2024-09-02 23:25:08 +02:00
datetime.c
dict.c
docstring.c
exceptions.c
file.c
float.c
gc.c
getargs.c
hash.c gh-122854: Add Py_HashBuffer() function (#122855) 2024-08-30 15:42:27 +00:00
heaptype.c gh-124153: Implement PyType_GetBaseByToken() and Py_tp_token slot (GH-124163) 2024-09-18 09:18:19 +02:00
immortal.c
list.c
long.c
mem.c
monitoring.c
numbers.c gh-111495: Add tests for PyNumber C API (#111996) 2024-08-26 15:59:22 +02:00
object.c
parts.h gh-107954, PEP 741: Add PyConfig_Get()/Set() functions (#123472) 2024-09-02 23:25:08 +02:00
pyatomic.c
README.txt
run.c Fix typos in docs, error messages and comments (#123336) 2024-08-28 14:41:04 +03:00
set.c
structmember.c
time.c
tuple.c
unicode.c
util.h gh-111495: Add tests for PyCodec_* C API (#123343) 2024-09-29 15:22:39 +00:00
vectorcall.c
watchers.c gh-119333: Add C api to have contextvar enter/exit callbacks (#119335) 2024-09-23 20:40:17 -07: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.