]> granicus.if.org Git - python/commitdiff
use more robust quoting
authorBenjamin Peterson <benjamin@python.org>
Thu, 14 Jan 2010 02:40:10 +0000 (02:40 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 14 Jan 2010 02:40:10 +0000 (02:40 +0000)
Lib/test/test_popen.py

index 454ba171e4a24c2f948cc6642eac6fc5c36902e7..95f6d209763fe138bf6815c00719630b1f9e3b52 100644 (file)
@@ -17,7 +17,7 @@ python = sys.executable
 
 class PopenTest(unittest.TestCase):
     def _do_test_commandline(self, cmdline, expected):
-        cmd = '%r -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)