diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-05-17 07:17:34 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-05-17 07:17:34 (GMT) |
commit | af8a68733fe2e24384e7105745c504243ab8db29 (patch) | |
tree | 3b81995ad79284fc84e16f0413c6e17167184689 | |
parent | 664782e1c855db7f78f961fb993461709a330277 (diff) | |
download | cpython-af8a68733fe2e24384e7105745c504243ab8db29.zip cpython-af8a68733fe2e24384e7105745c504243ab8db29.tar.gz cpython-af8a68733fe2e24384e7105745c504243ab8db29.tar.bz2 |
fix issue2381: test_subprocess fails if your sys.executable is on a
path with a space in it.
-rw-r--r-- | Lib/test/test_subprocess.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 3195339..f31ce75 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -534,7 +534,7 @@ class ProcessTestCase(unittest.TestCase): # args is a string f, fname = self.mkstemp() os.write(f, "#!/bin/sh\n") - os.write(f, "exec %s -c 'import sys; sys.exit(47)'\n" % + os.write(f, "exec '%s' -c 'import sys; sys.exit(47)'\n" % sys.executable) os.close(f) os.chmod(fname, 0700) @@ -576,7 +576,7 @@ class ProcessTestCase(unittest.TestCase): # call() function with string argument on UNIX f, fname = self.mkstemp() os.write(f, "#!/bin/sh\n") - os.write(f, "exec %s -c 'import sys; sys.exit(47)'\n" % + os.write(f, "exec '%s' -c 'import sys; sys.exit(47)'\n" % sys.executable) os.close(f) os.chmod(fname, 0700) |