Mailing List Archive

python/dist/src/Lib/test test_atexit.py,1.8,1.9
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv12033

Modified Files:
test_atexit.py
Log Message:
Make the test pass for jython where there are no sys.executable.



Index: test_atexit.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_atexit.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** test_atexit.py 30 Jul 2002 23:26:01 -0000 1.8
--- test_atexit.py 6 Nov 2002 11:37:57 -0000 1.9
***************
*** 1,8 ****
# Test the atexit module.
! from test.test_support import TESTFN, vereq
import atexit
from os import popen, unlink
import sys

input = """\
import atexit
--- 1,12 ----
# Test the atexit module.
! from test.test_support import TESTFN, vereq, is_jython
import atexit
from os import popen, unlink
import sys

+ executable = sys.executable
+ if is_jython:
+ executable = "jython"
+
input = """\
import atexit
***************
*** 24,28 ****
f.close()

! p = popen("%s %s" % (sys.executable, fname))
output = p.read()
p.close()
--- 28,32 ----
f.close()

! p = popen("%s %s" % (executable, fname))
output = p.read()
p.close()
***************
*** 52,56 ****
f.close()

! p = popen("%s %s" % (sys.executable, fname))
output = p.read()
p.close()
--- 56,60 ----
f.close()

! p = popen("%s %s" % (executable, fname))
output = p.read()
p.close()