-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
bpo-40275: Use new test.support helper submodules in tests #20824
bpo-40275: Use new test.support helper submodules in tests #20824
Conversation
@vstinner Hi, victor. Pls take a look if you have free time. |
@serhiy-storchaka: Hi. Would you be available next week to have a look at what has been done recently in |
I do not see a value in getting rid of the os module import. It is one of base modules, and it is used in the test launcher and in most tests, so you actually cannot get rid of importing it. It just disturbs the files history and makes the software archeology harder. Please stop. |
Thanks for your comment, serhiy. IMHO, it's not try to getting rid of the os module import but to control what exact modules we want import in ut. |
They were always imported from the |
some testcases like test_unix_events.py have not use |
Hi Serhiy, The creation of the support.os_helper submodule is not directly related the "test.support has way too many imports" https://bugs.python.org/issue40275 issue, but more about the old bpo-15494 "Move test/support.py into a test.support subpackage", commit fb15aa1:
Between Python 2.7 and Python 3.10, support became 2x larger:
But this PR is not only about os_helper. There are also support.import_helper and support.warning_helper. Removing
If we remove
If these changes create too many merge conflicts, we can backport https://bugs.python.org/issue40275 changes to 3.8 and 3.9 branches. |
@shihai1991: Can you please solve the merge conflict? |
sure, I rebase it now ;) |
thanks, victor :) |
Use test helpers in the following test cases:
https://bugs.python.org/issue40275