Skip to content

Commit 814a94c

Browse files
author
Anselm Kruis
committed
Merge branch 3.5-slp into master-slp (issue python#112 test suite fix)
2 parents f334ffc + 70d307e commit 814a94c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/support/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,10 +895,12 @@ def temp_dir(path=None, quiet=False):
895895
raise
896896
warnings.warn('tests may fail, unable to create temp dir: ' + path,
897897
RuntimeWarning, stacklevel=3)
898+
if dir_created:
899+
pid = os.getpid()
898900
try:
899901
yield path
900902
finally:
901-
if dir_created:
903+
if dir_created and pid == os.getpid():
902904
shutil.rmtree(path)
903905

904906
@contextlib.contextmanager

0 commit comments

Comments
 (0)