Issue #8513: On UNIX, subprocess supports bytes command string.

This commit is contained in:
Victor Stinner 2011-03-03 12:54:05 +00:00
parent 8370bb9528
commit 7b3b20ad29
3 changed files with 8 additions and 1 deletions

View file

@ -1059,6 +1059,11 @@ class POSIXProcessTestCase(BaseTestCase):
exitcode = subprocess.call([abs_program, "-c", "pass"])
self.assertEqual(exitcode, 0)
# absolute bytes path as a string
cmd = b"'" + abs_program + b"' -c pass"
exitcode = subprocess.call(cmd, shell=True)
self.assertEqual(exitcode, 0)
# bytes program, unicode PATH
env = os.environ.copy()
env["PATH"] = path