cpython/Modules/_testcapi
Petr Viktorin 0c74fc8af0
gh-137210: Add a struct, slot & function for checking an extension's ABI (GH-137212)
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2025-09-05 16:23:18 +02:00
..
clinic gh-130317: Fix test_pack_unpack_roundtrip() and add docs (#133204) 2025-05-01 16:20:36 +02:00
abstract.c gh-135075: Make PyObject_SetAttr() fail with NULL value and exception (#136180) 2025-07-03 14:51:44 +02:00
buffer.c gh-111178: fix UBSan failures for Modules/_testcapi/{buffer,monitoring}.c (#131613) 2025-03-24 11:06:37 +01:00
bytes.c
code.c
codec.c
complex.c gh-128813: hide mixed-mode functions for complex arithmetic from C-API (#131703) 2025-04-22 14:18:18 +02:00
config.c
datetime.c
dict.c
docstring.c gh-111178: remove redundant casts for functions with correct signatures (#131673) 2025-04-01 17:18:11 +02:00
exceptions.c GH-137623: Use an AC decorator for docstring line length enforcement (#137690) 2025-08-18 18:29:00 +01:00
file.c gh-132162: Add tests for Py_UniversalNewlineFgets() (#132164) 2025-04-24 17:43:48 +02:00
float.c gh-130317: Fix test_pack_unpack_roundtrip() and add docs (#133204) 2025-05-01 16:20:36 +02:00
frame.c
function.c
gc.c gh-111178: remove redundant casts for functions with correct signatures (#131673) 2025-04-01 17:18:11 +02:00
getargs.c
hash.c
heaptype.c gh-133166: Fix missing error emission of PyType_GetModuleByDef (GH-133240) 2025-05-01 14:32:57 +02:00
immortal.c
import.c
list.c
long.c gh-135709: Fix two compile warnings on WASM buildbot (#135712) 2025-06-19 18:46:40 +03:00
mem.c gh-111178: remove redundant casts for functions with correct signatures (#131673) 2025-04-01 17:18:11 +02:00
modsupport.c gh-137210: Add a struct, slot & function for checking an extension's ABI (GH-137212) 2025-09-05 16:23:18 +02:00
monitoring.c gh-136300: Modify C tests to conform to PEP-737 (GH-136301) 2025-07-11 15:18:35 +02:00
numbers.c
object.c gh-133140: Add PyUnstable_Object_IsUniquelyReferenced for free-threading (#133144) 2025-05-05 21:01:20 +02:00
parts.h gh-137210: Add a struct, slot & function for checking an extension's ABI (GH-137212) 2025-09-05 16:23:18 +02:00
pyatomic.c
README.txt
run.c
set.c
structmember.c
time.c gh-136300: Modify C tests to conform to PEP-737 (GH-136301) 2025-07-11 15:18:35 +02:00
tuple.c
type.c
unicode.c gh-134891: Add PyUnstable_Unicode_GET_CACHED_HASH (GH-134892) 2025-06-06 15:51:00 +02:00
util.h
vectorcall.c GH-137623: Use an AC decorator for docstring line length enforcement (#137690) 2025-08-18 18:29:00 +01:00
watchers.c gh-111178: remove redundant casts for functions with correct signatures (#131673) 2025-04-01 17:18:11 +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.