mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527)
multiprocessing tests now call explicitly _run_finalizers() to remove
immediately temporary directories created by
multiprocessing.util.get_temp_dir().
(cherry picked from commit 039fb49c18
)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
This commit is contained in:
parent
d4c664736e
commit
632cb36084
2 changed files with 5 additions and 0 deletions
|
@ -5651,6 +5651,9 @@ def install_tests_in_module_dict(remote_globs, start_method):
|
||||||
if need_sleep:
|
if need_sleep:
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
multiprocessing.process._cleanup()
|
multiprocessing.process._cleanup()
|
||||||
|
# bpo-37421: Explicitly call _run_finalizers() to remove immediately
|
||||||
|
# temporary directories created by multiprocessing.util.get_temp_dir().
|
||||||
|
multiprocessing.util._run_finalizers()
|
||||||
test.support.gc_collect()
|
test.support.gc_collect()
|
||||||
|
|
||||||
remote_globs['setUpModule'] = setUpModule
|
remote_globs['setUpModule'] = setUpModule
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
multiprocessing tests now explicitly call ``_run_finalizers()`` to
|
||||||
|
immediately remove temporary directories created by tests.
|
Loading…
Add table
Add a link
Reference in a new issue