cpython/Modules/_testcapi
Miss Islington (bot) 106d6456ca
[3.12] gh-121791: Check for NULL in MethodDescriptor2_new in _testcapi (GH-121792) (#121840)
gh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` (GH-121792)
(cherry picked from commit 8b6d475581)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-07-16 08:51:50 +00:00
..
clinic
abstract.c
buffer.c
bytearray.c
bytes.c
code.c
codec.c
complex.c
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
docstring.c
exceptions.c
file.c
float.c
gc.c
getargs.c
heaptype.c
heaptype_relative.c
immortal.c
list.c
long.c [3.12] gh-117021: Fix integer overflow in PyLong_AsPid() on non-Windows 64-bit platforms (GH-117064) (GH-117070) 2024-03-20 16:44:05 +02:00
mem.c [3.12] gh-112536: Add --tsan test for reasonable TSAN execution times. (gh-116601) (#116929) 2024-03-18 10:22:19 +01:00
numbers.c
parts.h [3.12] gh-117968: Add tests for the part of the PyRun family of the C API (GH-117982) (GH-118011) 2024-04-22 18:59:28 +00:00
pyos.c
pytime.c
README.txt
run.c [3.12] gh-117968: Make the test for closed file more safe in the C API tests (GH-118230) (GH-118266) 2024-04-25 05:16:43 +00:00
set.c
structmember.c
sys.c
testcapi_long.h
tuple.c
unicode.c
util.h
vectorcall.c [3.12] gh-121791: Check for NULL in MethodDescriptor2_new in _testcapi (GH-121792) (#121840) 2024-07-16 08:51:50 +00:00
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.