cpython/Modules/_testcapi
Miss Islington (bot) bc23ad4b99
[3.12] bpo-36796: Clean the error handling in _testcapimodule.c (GH-13085) (GH-113132)
(cherry picked from commit a723a13bf1)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2023-12-14 19:39:57 +00:00
..
clinic
abstract.c [3.12] Add more C API tests (GH-112522) (GH-112525) 2023-11-29 22:02:57 +02:00
buffer.c
bytearray.c [3.12] gh-111495: Add tests for PyBytes and PyByteArray C API (GH-111496) (GH-111607) 2023-11-01 18:23:39 +00:00
bytes.c [3.12] gh-111495: Add tests for PyBytes and PyByteArray C API (GH-111496) (GH-111607) 2023-11-01 18:23:39 +00:00
code.c [3.12] C API tests: use special markers to test that output parameters were set (GH-109014) (#109023) 2023-09-08 15:09:49 +02:00
codec.c [3.12] gh-111495: add stub files for C API test modules (GH-111586) (GH-111592) 2023-11-01 09:43:56 +02:00
complex.c [3.12] gh-109802: Increase test coverage for complexobject.c (GH-112452) (GH-112489) 2023-11-28 08:33:44 +00:00
datetime.c [3.12] bpo-36796: Clean the error handling in _testcapimodule.c (GH-13085) (GH-113132) 2023-12-14 19:39:57 +00:00
dict.c [3.12] gh-110549: Remove unused includes of <stddef.h> in _testcapi (GH-110552) (GH-110553) 2023-10-09 11:43:35 +00:00
docstring.c
exceptions.c [3.12] gh-108082: C API: Add tests for PyErr_WriteUnraisable() (GH-111455) (GH-111507) 2023-10-30 17:36:00 +00:00
file.c [3.12] gh-111495: add stub files for C API test modules (GH-111586) (GH-111592) 2023-11-01 09:43:56 +02:00
float.c [3.12] gh-111495: Add tests for PyFloat C API (GH-111624) (GH-111752) 2023-11-05 10:01:31 +02:00
gc.c
getargs.c [3.12] gh-112438: Fix support of format units with the "e" prefix in nested tuples in PyArg_Parse (gh-112439) (GH-112460) 2023-11-27 17:57:30 +00:00
heaptype.c
heaptype_relative.c
immortal.c
list.c [3.12] gh-111495: Add tests for PyList C API (GH-111562) (GH-111861) 2023-11-08 18:10:13 +00:00
long.c [3.12] gh-110628: Add tests for PyLong C API (GH-110629) (GH-110854) 2023-10-14 10:20:24 +03:00
mem.c
numbers.c [3.12] gh-111495: add stub files for C API test modules (GH-111586) (GH-111592) 2023-11-01 09:43:56 +02:00
parts.h [3.12] gh-111495: add stub files for C API test modules (GH-111586) (GH-111592) 2023-11-01 09:43:56 +02:00
pyos.c
pytime.c
README.txt
set.c [3.12] gh-110549: Remove unused includes of <stddef.h> in _testcapi (GH-110552) (GH-110553) 2023-10-09 11:43:35 +00:00
structmember.c
sys.c [3.12] gh-111065: Add more tests for the C API with the PySys_ prefix (GH-111067) (GH-111305) 2023-10-25 09:10:03 +00:00
testcapi_long.h
tuple.c [3.12] gh-111495: add stub files for C API test modules (GH-111586) (GH-111592) 2023-11-01 09:43:56 +02:00
unicode.c [3.12] C API tests: use special markers to test that output parameters were set (GH-109014) (#109023) 2023-09-08 15:09:49 +02:00
util.h [3.12] gh-109469: Silence compiler warnings on string comparisons in _testcapi (GH-109533) (#109558) 2023-10-02 16:59:43 +02:00
vectorcall.c
vectorcall_limited.c
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.