summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-03-03 12:54:05 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-03-03 12:54:05 (GMT)
commit7b3b20ad29be6d77608b4bd9cd09b61b67783bcf (patch)
tree87a6e7e58d31f67e741226aa880043833525b061 /Lib/test/test_subprocess.py
parent8370bb952809f72b387f11e58aa7b0452e383915 (diff)
downloadcpython-7b3b20ad29be6d77608b4bd9cd09b61b67783bcf.zip
cpython-7b3b20ad29be6d77608b4bd9cd09b61b67783bcf.tar.gz
cpython-7b3b20ad29be6d77608b4bd9cd09b61b67783bcf.tar.bz2
Issue #8513: On UNIX, subprocess supports bytes command string.
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 9e267eb..d91a4a6 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -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