]> granicus.if.org Git - python/commitdiff
Get popen test to work even if python is not in the path
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 20 Jul 2002 20:35:13 +0000 (20:35 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 20 Jul 2002 20:35:13 +0000 (20:35 +0000)
Lib/test/test_popen.py

index 2681eb0fe89b985734ea4606644feba8a7d3333a..17491d84107cfaff0b111f91aea4b1877a4da129 100644 (file)
@@ -15,7 +15,7 @@ from os import popen
 # 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.
 def _do_test_commandline(cmdline, expected):
-    cmd = 'python -c "import sys;print sys.argv" %s' % (cmdline,)
+    cmd = '%s -c "import sys;print sys.argv" %s' % (sys.executable, cmdline)
     data = popen(cmd).read()
     got = eval(data)[1:] # strip off argv[0]
     if got != expected: