Skip to content

Commit

Permalink
Issue #112: Prepare Stackless 3.5, fix a C-Python test suite bug
Browse files Browse the repository at this point in the history
This commit merges the fix from C-Python pull request
python#1066 (git commit 22e032a) for
bpo-30028. Without this change
   $ ./python -m test.regrtest test_multiprocessing_fork
fails. ($ ./python -m test.test_multiprocessing_fork is OK.)

https://bitbucket.org/stackless-dev/stackless/issues/112
(grafted from bda8a9d487da7cfbe4357d5c4c7635e0de19c6af)
  • Loading branch information
Anselm Kruis committed Apr 9, 2017
1 parent ba5cf46 commit ca52f72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,10 +902,12 @@ def temp_dir(path=None, quiet=False):
raise
warnings.warn('tests may fail, unable to create temp dir: ' + path,
RuntimeWarning, stacklevel=3)
if dir_created:
pid = os.getpid()
try:
yield path
finally:
if dir_created:
if dir_created and pid == os.getpid():
shutil.rmtree(path)

@contextlib.contextmanager
Expand Down

0 comments on commit ca52f72

Please sign in to comment.