cpython/Modules/_testcapi
Miss Islington (bot) f5231469b5
[3.15] gh-148829: Make sentinels' repr and module customizable (GH-149654) (#150092)
Implementation of python/peps#4968.
(cherry picked from commit 08218030a5)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-05-22 07:44:34 -07:00
..
clinic
abstract.c
buffer.c
bytes.c
code.c
codec.c
complex.c
config.c
datetime.c
dict.c
docstring.c
exceptions.c
file.c
float.c
frame.c
function.c
gc.c
getargs.c
hash.c
heaptype.c
immortal.c
import.c
list.c
long.c
mem.c
modsupport.c
module.c
monitoring.c
numbers.c
object.c [3.15] gh-148829: Make sentinels' repr and module customizable (GH-149654) (#150092) 2026-05-22 07:44:34 -07:00
parts.h
pyatomic.c
README.txt
run.c
set.c
structmember.c
time.c
tuple.c
type.c
unicode.c
util.h
vectorcall.c
watchers.c [3.15] gh-145235: Make dict watcher API thread-safe for free-threaded builds (gh-145233) (#149690) 2026-05-11 14:23:39 -04: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.