From: Finn Bock Date: Wed, 6 Nov 2002 11:41:48 +0000 (+0000) Subject: Backport 1.8->1.9: Make the test pass for jython where there are no X-Git-Tag: v2.2.3c1~249 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4286c9ffaa57d6a84de0fe07aa689fcdc3da5d23;p=thirdparty%2FPython%2Fcpython.git Backport 1.8->1.9: Make the test pass for jython where there are no sys.executable. --- diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py index 9b93b6815b56..f273a0fed2a7 100644 --- a/Lib/test/test_atexit.py +++ b/Lib/test/test_atexit.py @@ -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, """\