You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Lib/test/test_ctypes/test_structure.py is very long, but Lib/test/test_ctypes/test_union.py only has recent additions.
A lot of the Structure tests apply to Union as well, and should be run on both. My plan is:
Move tests of common features to Lib/test/test_ctypes/test_structunion.py, and use the “common base class + two subclasses” pattern used for tests of similar classes
Keep the Structure-specific tests in Lib/test/test_ctypes/test_structure.py
- Move some Structure tests to test_structunion; use a common base
test class + two subclasses to run them on Union too
- Remove test_union for now as it's redundant
Note: `test_simple_structs` & `test_simple_unions` are in the common
file because they share `formats`.
But ctypes isn't stable and unchanging. In 3.14 the struct/union packing algorithm is replaced and moved to Python code. That on its own deserves better Union tests.
- Move some Structure tests to test_structunion; use a common base
test class + two subclasses to run them on Union too
- Remove test_union for now as it's redundant
Note: `test_simple_structs` & `test_simple_unions` are in the common
file because they share `formats`.
Currently,
Lib/test/test_ctypes/test_structure.py
is very long, butLib/test/test_ctypes/test_union.py
only has recent additions.A lot of the Structure tests apply to Union as well, and should be run on both. My plan is:
Lib/test/test_ctypes/test_structunion.py
, and use the “common base class + two subclasses” pattern used for tests of similar classesLib/test/test_ctypes/test_structure.py
Linked PRs
The text was updated successfully, but these errors were encountered: