Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 282083d

Browse files
committed
Issue #15300: Ensure the temporary test working directories are in the same parent folder when running tests in multiprocess mode from a Python build.
Patch by Chris Jerdonek.
1 parent 67097fd commit 282083d

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

Lib/test/regrtest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,14 @@ def work():
572572
output.put((None, None, None, None))
573573
return
574574
# -E is needed by some tests, e.g. test_import
575+
# Running the child from the same working directory ensures
576+
# that TEMPDIR for the child is the same when
577+
# sysconfig.is_python_build() is true. See issue 15300.
575578
popen = Popen(base_cmd + ['--slaveargs', json.dumps(args_tuple)],
576579
stdout=PIPE, stderr=PIPE,
577580
universal_newlines=True,
578-
close_fds=(os.name != 'nt'))
581+
close_fds=(os.name != 'nt'),
582+
cwd=support.SAVEDCWD)
579583
stdout, stderr = popen.communicate()
580584
# Strip last refcount output line if it exists, since it
581585
# comes from the shutdown of the interpreter in the subcommand.

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ Zbyszek Jędrzejewski-Szmek
458458
Drew Jenkins
459459
Flemming Kjær Jensen
460460
MunSic Jeong
461+
Chris Jerdonek
461462
Orjan Johansen
462463
Fredrik Johansson
463464
Gregory K. Johnson

Misc/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ Extension Modules
341341
Tests
342342
-----
343343

344+
- Issue #15300: Ensure the temporary test working directories are in the same
345+
parent folder when running tests in multiprocess mode from a Python build.
346+
Patch by Chris Jerdonek.
347+
344348
- test_nntplib now tolerates being run from behind NNTP gateways that add
345349
"X-Antivirus" headers to articles
346350

0 commit comments

Comments
 (0)