Skip to content

Commit

Permalink
bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527)
Browse files Browse the repository at this point in the history
multiprocessing tests now call explicitly _run_finalizers() to remove
immediately temporary directories created by
multiprocessing.util.get_temp_dir().
  • Loading branch information
vstinner authored Jul 2, 2019
1 parent 61bf97e commit 039fb49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5651,6 +5651,9 @@ def tearDownModule():
if need_sleep:
time.sleep(0.5)
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()

remote_globs['setUpModule'] = setUpModule
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
multiprocessing tests now explicitly call ``_run_finalizers()`` to
immediately remove temporary directories created by tests.

0 comments on commit 039fb49

Please sign in to comment.