cpython/Modules/_testcapi
2024-04-01 17:01:22 +02:00
..
clinic gh-116417: Move limited C API long.c tests to _testlimitedcapi (#117001) 2024-03-19 14:04:23 +00:00
abstract.c gh-116417: Move limited C API abstract.c tests to _testlimitedcapi (#116986) 2024-03-19 10:44:13 +00:00
buffer.c gh-114685: Check flags in PyObject_GetBuffer() (GH-114707) 2024-01-31 13:11:35 +02:00
bytes.c gh-87193: Support bytes objects with refcount > 1 in _PyBytes_Resize() (GH-117160) 2024-03-25 16:32:11 +01:00
code.c
codec.c
complex.c gh-116417: Move limited C API complex.c tests to _testlimitedcapi (#117014) 2024-03-19 17:23:12 +01:00
datetime.c bpo-36796: Clean the error handling in _testcapimodule.c (GH-13085) 2023-12-14 19:06:53 +00:00
dict.c gh-116417: Move limited C API dict.c tests to _testlimitedcapi (#117006) 2024-03-19 15:06:20 +00:00
docstring.c
exceptions.c
file.c
float.c gh-116417: Move limited C API abstract.c tests to _testlimitedcapi (#116986) 2024-03-19 10:44:13 +00:00
gc.c gh-113750: Fix object resurrection in free-threaded builds (gh-113751) 2024-01-06 12:12:26 +09:00
getargs.c gh-114101: Correct PyErr_Format arguments in _testcapi module (#114102) 2024-01-16 09:32:39 +01:00
hash.c gh-113024: C API: Add PyObject_GenericHash() function (GH-113025) 2024-03-22 20:19:10 +02:00
heaptype.c
immortal.c
list.c gh-116417: Move limited C API list.c tests to _testlimitedcapi (#116602) 2024-03-18 22:03:55 +01:00
long.c gh-117021: Fix integer overflow in PyLong_AsPid() on non-Windows 64-bit platforms (GH-117064) 2024-03-20 15:39:53 +02:00
mem.c
numbers.c
object.c gh-94808: Fix refcounting in PyObject_Print tests (GH-117421) 2024-04-01 17:01:22 +02:00
parts.h gh-94808:Improve coverage of PyObject_Print (GH-98749) 2024-04-01 12:52:25 +00:00
pyatomic.c
README.txt
set.c gh-116417: Move limited C API list.c tests to _testlimitedcapi (#116602) 2024-03-18 22:03:55 +01:00
structmember.c
time.c gh-110850: Enhance PyTime C API tests (#115715) 2024-02-20 15:53:40 +01:00
tuple.c
unicode.c gh-116417: Move limited C API unicode.c tests to _testlimitedcapi (#116993) 2024-03-19 12:30:39 +00:00
util.h
vectorcall.c
watchers.c GH-113710: Add a "globals to constants" pass (GH-114592) 2024-02-02 12:14:34 +00: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.