]> granicus.if.org Git - python/commit
bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 23 Feb 2018 05:39:02 +0000 (21:39 -0800)
committerGitHub <noreply@github.com>
Fri, 23 Feb 2018 05:39:02 +0000 (21:39 -0800)
commit694c5e0e1f7f23595fab314f26b89e241477ff18
treef3a18b8694d10334beaa65e1d3e0de950ec8cbf6
parent24d6e3c56bf99fd122e23da4c843fed3eb2a8b1c
bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066)

Make test.support.temp_cwd() fork-safe. The context manager test.support.temp_cwd() no longer removes the temporary directory when executing in a process other than the parent it entered from.
If a forked child exits the context manager it won't do the cleanup.
(cherry picked from commit 33dddac00ba8d9b72cf21b8698504077eb3c23ad)

Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
Lib/test/support/__init__.py
Lib/test/test_support.py
Misc/ACKS