cpython/Modules/_testcapi
AN Long 6c502ba809
gh-114101: Correct PyErr_Format arguments in _testcapi module (#114102)
- use PyErr_SetString() iso. PyErr_Format() in parse_tuple_and_keywords()
- fix misspelled format specifier in CHECK_SIGNNESS() macro
2024-01-16 09:32:39 +01:00
..
clinic gh-111089: Revert PyUnicode_AsUTF8() changes (#111833) 2023-11-07 22:36:13 +00:00
abstract.c Add more C API tests (GH-112522) 2023-11-29 17:37:05 +02:00
buffer.c
bytearray.c gh-111495: Add tests for PyBytes and PyByteArray C API (GH-111496) 2023-11-01 17:31:07 +02:00
bytes.c gh-111495: Add tests for PyBytes and PyByteArray C API (GH-111496) 2023-11-01 17:31:07 +02:00
code.c
codec.c gh-111495: add stub files for C API test modules (GH-111586) 2023-11-01 07:44:54 +02:00
complex.c gh-109802: Increase test coverage for complexobject.c (GH-112452) 2023-11-28 10:18:33 +02: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-111262: Add PyDict_Pop() function (#112028) 2023-11-14 12:51:00 +00:00
docstring.c
exceptions.c
file.c gh-111495: add stub files for C API test modules (GH-111586) 2023-11-01 07:44:54 +02:00
float.c gh-111495: Add tests for PyFloat C API (GH-111624) 2023-11-05 09:20:12 +02: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-111545: Add Py_HashPointer() function (#112096) 2023-12-06 15:09:22 +01:00
heaptype.c
heaptype_relative.c gh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows (GH-112778) 2023-12-13 15:38:45 +00:00
immortal.c
list.c gh-111138: Add PyList_Extend() and PyList_Clear() functions (#111862) 2023-11-13 16:14:56 +00:00
long.c
mem.c
numbers.c gh-111495: add stub files for C API test modules (GH-111586) 2023-11-01 07:44:54 +02:00
parts.h gh-111545: Test PyHash_GetFuncDef() function (#112098) 2023-11-15 03:41:29 +01:00
pyatomic.c
pyos.c
README.txt
set.c
structmember.c
sys.c
testcapi_long.h
tuple.c gh-111495: add stub files for C API test modules (GH-111586) 2023-11-01 07:44:54 +02:00
unicode.c
util.h
vectorcall.c
vectorcall_limited.c gh-113787: Fix refleaks in test_capi (gh-113816) 2024-01-08 08:34:51 -08:00
watchers.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.