New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move all stdlib tests in the test package #93839
Comments
It seems like the Windows installer only treat Lib/test/ separately: see Tools/msi/test/test.wixproj. I would be nice to also exclude the other test directories to make Python installation smaller on Windows.
The total is about 2 732 KB. On Fedora 36, the Python 3.10 tests (python3-test package) take around 54 MB in total (it includes idle_test, ctypes tests, etc.).
|
Yes, yes, yes! |
This appears to duplicate #54781. I'm still in favor :) |
* Remove Lib/test/test_ctypes.py
* Remove Lib/test/test_unittest.py
Please leave idlelib/idle_test alone. Following gives some of reasons: |
Could you exclude idle and distutils from your list, and attach the new PRs to the other ticket? |
* Move Lib/ctypes/test/ to Lib/test/test_ctypes/ * Remove Lib/test/test_ctypes.py * Update imports and build system.
* Move Lib/unittest/test/ to Lib/test/test_unittest/ * Remove Lib/test/test_unittest.py * Replace unittest.test with test.test_unittest * Remove unittest.load_tests() * Rewrite unittest __init__.py and __main__.py * Update build system, CODEOWNERS, and wasm_assets.py
I merged my ctypes and unittest PRs. Ok, let's continue in issue #54781. |
PR #94043 broke testing on all WebAssembly platforms. |
Commit #94043 used this ticket as reference. |
There are actually two problems:
|
Fixes failing tests on WebAssembly platforms.
Fixes failing tests on WebAssembly platforms. Automerge-Triggered-By: GH:tiran
Currently, Python tests are scattered in multiple directories:
idlelib, ctypes, lib2to3, tkinter, unittest and distutils have their tests under their own packages. It causes multiple issues:
TESTSUBDIRS
variable.I propose to move ctypes, idlelib, tkinter and unittest tests under Lib/test/.
For distutils and lib2to3, maybe we can just leave them where they are, since both modules are deprecated. distutils should be removed in Python 3.12. lib2to3 is scheduled for removal in Python 3.13.
Do you think that it's worth it to move these directories?
The text was updated successfully, but these errors were encountered: