cpython/Modules/_testcapi
Victor Stinner 8992704916
gh-144175: Remove internal _PyArg_ParseStack() function (#159150)
Replace internal _PyArg_ParseStack() with public PyArg_ParseArray()
in Argument Clinic.
2026-10-12 19:56:53 +02:00
..
clinic gh-144175: Remove internal _PyArg_ParseStack() function (#159150) 2026-10-12 19:56:53 +02:00
abstract.c
buffer.c
bytes.c gh-158585: Fix refleak in _testcapi.bytes_resize() (#158806) 2026-10-04 22:07:31 +00:00
code.c
codec.c
complex.c gh-155526: Don't check errno in abs(complex) (#155527) 2026-09-11 17:46:59 +02:00
config.c
datetime.c
dict.c
docstring.c
exceptions.c gh-156204: Guard recursion in PyErr_GivenExceptionMatches (GH-156205) 2026-10-02 16:22:05 -04:00
file.c
float.c
fpcast.c gh-129040: Use wasm-gc to handle pointer casts in wasi (GH-158617) 2026-10-09 22:25:44 +00:00
frame.c
function.c
gc.c gh-156395: Report frozen objects on free-threaded GC build (#156396) 2026-08-26 07:29:09 -07:00
getargs.c
hash.c gh-148233: Add Py_HashBuffer() to the limited C API (#157966) 2026-09-23 11:17:39 +02:00
heaptype.c
immortal.c
import.c gh-151510: Fix __lazy_import__ without frame (#151511) 2026-06-17 14:09:51 -04:00
list.c
long.c gh-155742: Check singletons consistency at Python exit (#157572) 2026-09-17 16:03:45 +02:00
marshal.c gh-155907: Complete PyMarshal C API tests (#157452) 2026-09-14 23:49:39 +02:00
mem.c gh-157429: Make test_detach_materialized_dict_no_memory deterministic (GH-157444) 2026-09-28 15:47:13 +00:00
modsupport.c
module.c
monitoring.c
numbers.c
object.c gh-158842: Add Py_SETREF() and Py_XSETREF() to the limited C API (#158843) 2026-10-06 21:13:49 +02:00
parts.h gh-129040: Use wasm-gc to handle pointer casts in wasi (GH-158617) 2026-10-09 22:25:44 +00:00
pyatomic.c
README.txt
run.c gh-152132: Test Py_CompileString() in test_capi.test_run (#153470) 2026-07-10 03:36:31 +02:00
set.c
structmember.c
time.c
tuple.c
type.c gh-155503: Add more PyType C API tests (#155505) 2026-08-12 14:40:04 +02:00
unicode.c gh-157710: Soft deprecate C API modifying str objects (#157711) 2026-10-05 07:16:37 +00:00
util.h gh-156939: Add tests on the PyUnicode C API (#157798) 2026-09-19 16:08:58 +00:00
vectorcall.c
watchers.c
weakref.c

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.