Kaydet (Commit) 0c6c859d authored tarafından Tim Graham's avatar Tim Graham

Fixed #27890 -- Fixed FileNotFoundError cleanup exception in runtests.py on Python 3.6+.

üst 2867b7eb
......@@ -217,6 +217,12 @@ def teardown(state):
# Restore the old settings.
for key, value in state.items():
setattr(settings, key, value)
# Discard the multiprocessing.util finalizer that tries to remove a
# temporary directory that's already removed by this script's
# atexit.register(shutil.rmtree, TMPDIR) handler. Prevents
# FileNotFoundError at the end of a test run on Python 3.6+ (#27890).
from multiprocessing.util import _finalizer_registry
_finalizer_registry.pop((-100, 0), None)
def actual_test_processes(parallel):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment