cpython/Modules/_testcapi
Miss Islington (bot) 8fe5897853
[3.15] gh-151510: Fix __lazy_import__ without frame (GH-151511) (#151610)
gh-151510: Fix __lazy_import__ without frame (GH-151511)
(cherry picked from commit eff805b7a7)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2026-06-17 18:40:33 +00:00
..
clinic
abstract.c
buffer.c
bytes.c
code.c
codec.c
complex.c
config.c
datetime.c
dict.c gh-141510: Test frozendict C API (#145081) 2026-02-21 17:00:23 +01:00
docstring.c
exceptions.c
file.c
float.c
frame.c
function.c gh-144629: Add test for the PyFunction_GetAnnotations() function (#144630) 2026-02-10 14:38:24 +00:00
gc.c
getargs.c
hash.c
heaptype.c gh-145921: Add "_DuringGC" functions for tp_traverse (GH-145925) 2026-04-08 09:15:11 +02:00
immortal.c gh-143050: Correct PyLong_FromString() to use _PyLong_Negate() (#145901) 2026-03-31 13:17:49 +00:00
import.c [3.15] gh-151510: Fix __lazy_import__ without frame (GH-151511) (#151610) 2026-06-17 18:40:33 +00:00
list.c
long.c gh-147988: Initialize digits in long_alloc() in debug mode (#147989) 2026-04-02 11:55:34 +00:00
mem.c [3.15] gh-151297: Fix undefined behavior in _PyObject_MiRealloc (GH-151358) (GH-151388) 2026-06-12 01:47:01 +00:00
modsupport.c gh-144175: Add PyArg_ParseArray() function (#144283) 2026-03-06 21:57:44 +00:00
module.c gh-149044: Implement PEP 820 – PySlot: Unified slot system for the C API (GH-149055) 2026-05-05 09:18:04 +02:00
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 [3.15] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151140) 2026-06-09 11:37:56 +00:00
pyatomic.c
README.txt
run.c
set.c
structmember.c
time.c
tuple.c
type.c gh-149044: Implement PEP 820 – PySlot: Unified slot system for the C API (GH-149055) 2026-05-05 09:18:04 +02:00
unicode.c Improve tests for the PyUnicodeWriter C API (GH-146157) 2026-03-19 19:15:30 +02:00
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
weakref.c [3.15] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151140) 2026-06-09 11:37:56 +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.