Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_subprocess.py @ 68214:738feec9ced0
Issue #8513: On UNIX, subprocess supports bytes command string.
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Thu, 03 Mar 2011 12:54:05 +0000 |
| parents | be6c38d1817b |
| children | b39270c6b8d1 |
line wrap: on
line diff
--- a/Lib/test/test_subprocess.py Thu Mar 03 11:08:33 2011 +0000 +++ b/Lib/test/test_subprocess.py Thu Mar 03 12:54:05 2011 +0000 @@ -1059,6 +1059,11 @@ 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
