]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-103092: Test _ctypes type hierarchy and features (#113727)
authorAN Long <aisk@users.noreply.github.com>
Tue, 9 Jan 2024 17:28:43 +0000 (01:28 +0800)
committerGitHub <noreply@github.com>
Tue, 9 Jan 2024 17:28:43 +0000 (18:28 +0100)
commitbe89ee5649031e08f191bf596fa20a09c5698079
tree386de55c7b287c0d21d6b86be2f1b02ccff0b91f
parentc31be58da8577ef140e83d4e46502c7bb1eb9abf
gh-103092: Test _ctypes type hierarchy and features (#113727)

Test the following features for _ctypes types:
- disallow instantiation
- inheritance (MRO)
- immutability
- type name

The following _ctypes types are tested:
- Array
- CField
- COMError
- PyCArrayType
- PyCFuncPtrType
- PyCPointerType
- PyCSimpleType
- PyCStructType
- Structure
- Union
- UnionType
- _CFuncPtr
- _Pointer
- _SimpleCData

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Lib/test/test_ctypes/_support.py [new file with mode: 0644]
Lib/test/test_ctypes/test_arrays.py
Lib/test/test_ctypes/test_funcptr.py
Lib/test/test_ctypes/test_pointers.py
Lib/test/test_ctypes/test_simplesubclasses.py
Lib/test/test_ctypes/test_struct_fields.py
Lib/test/test_ctypes/test_structures.py
Lib/test/test_ctypes/test_unions.py [new file with mode: 0644]
Lib/test/test_ctypes/test_win32.py