]> granicus.if.org Git - python/commitdiff
Patch #1559413: Fix test_cmd_line if sys.executable contains a space.
authorMartin v. Löwis <martin@v.loewis.de>
Wed, 14 Mar 2007 20:02:31 +0000 (20:02 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Wed, 14 Mar 2007 20:02:31 +0000 (20:02 +0000)
Will backport.

Lib/test/test_cmd_line.py
Misc/NEWS

index 5e898634d96044d92073107eac259fb9451f4bf2..cacae7a697aa74ecd38c804d0f5b264a13d6522d 100644 (file)
@@ -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()
index 56b9007c8ef93256049b547a03c907779ca96269..5486e3ecaaeceb9d0e54c009d8d6dfec6dc50e71 100644 (file)
--- 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.