Issue #27472: Add test.support.unix_shell as the path to the default shell.

This commit is contained in:
Xavier de Gaye 2016-07-22 12:15:29 +02:00
parent de85ed69f4
commit d141531eb5
5 changed files with 24 additions and 13 deletions

View file

@ -1579,7 +1579,7 @@ class POSIXProcessTestCase(BaseTestCase):
fd, fname = tempfile.mkstemp()
# reopen in text mode
with open(fd, "w", errors="surrogateescape") as fobj:
fobj.write("#!/bin/sh\n")
fobj.write("#!%s\n" % support.unix_shell)
fobj.write("exec '%s' -c 'import sys; sys.exit(47)'\n" %
sys.executable)
os.chmod(fname, 0o700)
@ -1624,7 +1624,7 @@ class POSIXProcessTestCase(BaseTestCase):
fd, fname = tempfile.mkstemp()
# reopen in text mode
with open(fd, "w", errors="surrogateescape") as fobj:
fobj.write("#!/bin/sh\n")
fobj.write("#!%s\n" % support.unix_shell)
fobj.write("exec '%s' -c 'import sys; sys.exit(47)'\n" %
sys.executable)
os.chmod(fname, 0o700)