[Python-checkins] python/dist/src/Lib/test test_popen.py,1.1,1.2
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Sat, 20 Jul 2002 13:35:15 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv19202
Modified Files:
test_popen.py
Log Message:
Get popen test to work even if python is not in the path
Index: test_popen.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_popen.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_popen.py 3 Apr 2002 01:47:00 -0000 1.1
--- test_popen.py 20 Jul 2002 20:35:13 -0000 1.2
***************
*** 16,20 ****
# 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,)
data = popen(cmd).read()
got = eval(data)[1:] # strip off argv[0]
--- 16,20 ----
# We can then eval() the result of this, and see what each argv was.
def _do_test_commandline(cmdline, expected):
! cmd = '%s -c "import sys;print sys.argv" %s' % (sys.executable, cmdline)
data = popen(cmd).read()
got = eval(data)[1:] # strip off argv[0]