]> granicus.if.org Git - python/commit
[2.7] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5825)
authorAnselm Kruis <a.kruis@science-computing.de>
Fri, 23 Feb 2018 16:27:28 +0000 (17:27 +0100)
committerGregory P. Smith <greg@krypto.org>
Fri, 23 Feb 2018 16:27:28 +0000 (08:27 -0800)
commit61bd4d2e6319a3c5c3b9ce5f807b44a45cc1d4a1
tree0a928284e9b82da4a392a2d5e0b12f2d8f44266b
parentb852d8c1f0b12e84549d83cd9b1ec0992b9d9703
[2.7] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5825)

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_test_support.py
Misc/ACKS