]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport 1.8->1.9: Make the test pass for jython where there are no
authorFinn Bock <bckfnn@worldonline.dk>
Wed, 6 Nov 2002 11:41:48 +0000 (11:41 +0000)
committerFinn Bock <bckfnn@worldonline.dk>
Wed, 6 Nov 2002 11:41:48 +0000 (11:41 +0000)
sys.executable.

Lib/test/test_atexit.py

index 9b93b6815b564ae99561462ddc09a9f8310eeb4d..f273a0fed2a7e566bc34f5c3d345b6af95b34066 100644 (file)
@@ -1,9 +1,13 @@
 # Test the atexit module.
-from test_support import TESTFN, vereq
+from 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, """\