cpython/Modules/_testcapi
2025-01-07 21:13:08 +00:00
..
clinic gh-127350: Add more tests for Py_fopen() (GH-128587) 2025-01-07 21:13:08 +00:00
abstract.c
buffer.c
bytes.c
code.c
codec.c
complex.c gh-69639: Add mixed-mode rules for complex arithmetic (C-like) (GH-124829) 2024-11-26 17:57:39 +02:00
config.c
datetime.c
dict.c
docstring.c
exceptions.c gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) 2024-12-17 12:12:45 +01:00
file.c gh-127350: Add more tests for Py_fopen() (GH-128587) 2025-01-07 21:13:08 +00:00
float.c
gc.c
getargs.c
hash.c
heaptype.c
immortal.c
list.c
long.c gh-102471, PEP 757: Add PyLong import and export API (#121339) 2024-12-13 14:24:48 +01:00
mem.c
monitoring.c GH-122548: Implement branch taken and not taken events for sys.monitoring (GH-122564) 2024-12-19 16:59:51 +00:00
numbers.c
object.c gh-127350: Add Py_fopen() and Py_fclose() functions (#127821) 2025-01-06 12:43:09 +00:00
parts.h
pyatomic.c
README.txt
run.c
set.c
structmember.c gh-127572: Fix test_structmembers initialization (GH-127577) 2024-12-04 09:58:22 +01:00
time.c
tuple.c
unicode.c
util.h
vectorcall.c
watchers.c gh-124872: Replace enter/exit events with "switched" (#125532) 2024-10-16 13:53:21 +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.