-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Some tests leak temporary files #81602
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
Comments
When running tests, the tempoary directory is not left clean: there are temporary files which are not removed. I wrote a PoC change to detect such bugs and I found that at least test_shutil and test_urllib leak such temporary files/directories. |
Test leaking a temporary file in test_urllib: I'm not sure of my fix:
|
Using PR 14415, the following test of test_multiprocessing_spawn emits a false alarm because multiprocessing use "Finalizer" objects which are only finalized "later": Workaround, call explicitly _run_finalizers():
|
About urllib.request, I created: bpo-37475 "What is urllib.request.urlcleanup() function?". |
./python -u -m test test_multiprocessing_spawn -R 3:3 still fail: ERROR: test_context (test.test_multiprocessing_spawn.TestStartMethod) PR 14601 fix these tests when test_multiprocessing_spawn is run more than once. |
I created a follow-up issue: bpo-37507 "multiprocessing: Add a stop() method to ForkServer". |
It seems like tests don't leak temporary files anymore:
I close the issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: