cpython/Modules/_testcapi
2023-11-05 07:42:42 +00:00
..
clinic gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585) 2023-11-01 16:34:42 +01:00
abstract.c gh-94808: Add coverage test for number check (gh-111445) 2023-10-29 07:00:19 +00:00
buffer.c
bytearray.c gh-111495: Add tests for PyBytes and PyByteArray C API (GH-111496) 2023-11-01 17:31:07 +02:00
bytes.c gh-111495: Add tests for PyBytes and PyByteArray C API (GH-111496) 2023-11-01 17:31:07 +02:00
code.c
codec.c gh-111495: add stub files for C API test modules (GH-111586) 2023-11-01 07:44:54 +02:00
complex.c gh-111495: Add tests for PyComplex C API (GH-111591) 2023-11-05 07:42:42 +00:00
datetime.c
dict.c gh-110549: Remove unused includes of <stddef.h> in _testcapi (GH-110552) 2023-10-09 10:37:57 +00:00
docstring.c
exceptions.c gh-108082: Add PyErr_FormatUnraisable() function (GH-111086) 2023-10-31 23:42:44 +02:00
file.c gh-111495: add stub files for C API test modules (GH-111586) 2023-11-01 07:44:54 +02:00
float.c gh-111495: Add tests for PyFloat C API (GH-111624) 2023-11-05 09:20:12 +02:00
gc.c
getargs.c gh-110572: Remove test_* from _testcapi/getargs.c (GH-111214) 2023-10-24 08:50:11 +03:00
heaptype.c
heaptype_relative.c gh-110481: Implement biased reference counting (gh-110764) 2023-10-30 16:06:09 +00:00
immortal.c
list.c gh-111495: add stub files for C API test modules (GH-111586) 2023-11-01 07:44:54 +02:00
long.c gh-110628: Add tests for PyLong C API (GH-110629) 2023-10-14 08:53:57 +03:00
mem.c gh-90815: Add mimalloc memory allocator (#109914) 2023-10-30 15:43:11 +00:00
numbers.c gh-111495: add stub files for C API test modules (GH-111586) 2023-11-01 07:44:54 +02:00
parts.h gh-111495: add stub files for C API test modules (GH-111586) 2023-11-01 07:44:54 +02:00
pyatomic.c gh-109693: Update _gil_runtime_state.locked to use pyatomic.h (gh-110836) 2023-10-17 07:32:50 +09:00
pyos.c
README.txt
set.c gh-110525: Cover PySet_Add corner case with frozenset objects (GH-110544) 2023-10-09 14:04:49 +03:00
structmember.c
sys.c gh-111065: Add more tests for the C API with the PySys_ prefix (GH-111067) 2023-10-25 11:33:12 +03:00
testcapi_long.h
tuple.c gh-111495: add stub files for C API test modules (GH-111586) 2023-11-01 07:44:54 +02:00
unicode.c gh-111089: PyUnicode_AsUTF8AndSize() sets size on error (#111106) 2023-10-20 20:03:11 +02:00
util.h
vectorcall.c gh-110964: Remove private _PyArg functions (#110966) 2023-10-17 14:30:31 +02:00
vectorcall_limited.c gh-110481: Implement biased reference counting (gh-110764) 2023-10-30 16:06:09 +00:00
watchers.c gh-110964: Remove private _PyArg functions (#110966) 2023-10-17 14:30:31 +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.