summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorFinn Bock <bckfnn@worldonline.dk>2002-11-06 11:37:57 (GMT)
committerFinn Bock <bckfnn@worldonline.dk>2002-11-06 11:37:57 (GMT)
commit41c570f2e7680ef1aa47c7b78d59825c608b3063 (patch)
tree05fb1e6accb5995fe39e627ee9b6da9c13e597eb /Lib/test
parent5a231c8f790b1d48daa83fc14b54c056d1330d45 (diff)
downloadcpython-41c570f2e7680ef1aa47c7b78d59825c608b3063.zip
cpython-41c570f2e7680ef1aa47c7b78d59825c608b3063.tar.gz
cpython-41c570f2e7680ef1aa47c7b78d59825c608b3063.tar.bz2
Make the test pass for jython where there are no sys.executable.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_atexit.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py
index c9d72a7..324b76e 100644
--- a/Lib/test/test_atexit.py
+++ b/Lib/test/test_atexit.py
@@ -1,9 +1,13 @@
# Test the atexit module.
-from test.test_support import TESTFN, vereq
+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
@@ -23,7 +27,7 @@ f = file(fname, "w")
f.write(input)
f.close()
-p = popen("%s %s" % (sys.executable, fname))
+p = popen("%s %s" % (executable, fname))
output = p.read()
p.close()
vereq(output, """\
@@ -51,7 +55,7 @@ f = file(fname, "w")
f.write(input)
f.close()
-p = popen("%s %s" % (sys.executable, fname))
+p = popen("%s %s" % (executable, fname))
output = p.read()
p.close()
vereq(output, """\