Index: Lib/test/test_popen.py =================================================================== --- Lib/test/test_popen.py (revision 77418) +++ Lib/test/test_popen.py (working copy) @@ -14,12 +14,10 @@ # This results in Python being spawned and printing the sys.argv list. # We can then eval() the result of this, and see what each argv was. python = sys.executable -if ' ' in python: - python = '"' + python + '"' # quote embedded space for cmdline class PopenTest(unittest.TestCase): def _do_test_commandline(self, cmdline, expected): - cmd = '%s -c "import sys;print sys.argv" %s' % (python, cmdline) + cmd = '"%s" -c "import sys;print sys.argv" %s' % (python, cmdline) data = os.popen(cmd).read() got = eval(data)[1:] # strip off argv[0] self.assertEqual(got, expected)