From: Martin v. Löwis Date: Wed, 14 Mar 2007 20:02:31 +0000 (+0000) Subject: Patch #1559413: Fix test_cmd_line if sys.executable contains a space. X-Git-Tag: v2.6a1~1994 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd1210a55fd11dc10da6d22a5cef4c26f90672eb;p=python Patch #1559413: Fix test_cmd_line if sys.executable contains a space. Will backport. --- diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index 5e898634d9..cacae7a697 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -6,7 +6,7 @@ import subprocess class CmdLineTest(unittest.TestCase): def start_python(self, cmd_line): - outfp, infp = popen2.popen4('%s %s' % (sys.executable, cmd_line)) + outfp, infp = popen2.popen4('"%s" %s' % (sys.executable, cmd_line)) infp.close() data = outfp.read() outfp.close() diff --git a/Misc/NEWS b/Misc/NEWS index 56b9007c8e..5486e3ecaa 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -624,6 +624,8 @@ Extension Modules Tests ----- +- Patch #1559413: Fix test_cmd_line if sys.executable contains a space. + - Added test.test_support.TransientResource which is a context manager to surround calls to resources that are not guaranteed to work even if test.test_support.requires says that the resource should exist.