diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-07-26 11:33:49 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-07-26 11:33:49 (GMT) |
commit | aeb6a60e03f6fa7c093fa88342f6502627add8e7 (patch) | |
tree | 5647bef157668a34a6db03fbfbb0edd07913d3ad /Lib/test | |
parent | c7554e28ee526113281c3fd252c543d063194a60 (diff) | |
download | cpython-aeb6a60e03f6fa7c093fa88342f6502627add8e7.zip cpython-aeb6a60e03f6fa7c093fa88342f6502627add8e7.tar.gz cpython-aeb6a60e03f6fa7c093fa88342f6502627add8e7.tar.bz2 |
Reorganized so the test is skipped if os.popen() doesn't exist (in stead of failing).
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_atexit.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py index 64c4c3c..9b93b68 100644 --- a/Lib/test/test_atexit.py +++ b/Lib/test/test_atexit.py @@ -1,7 +1,7 @@ # Test the atexit module. from test_support import TESTFN, vereq import atexit -import os +from os import popen, unlink import sys input = """\ @@ -23,7 +23,7 @@ f = file(fname, "w") f.write(input) f.close() -p = os.popen("%s %s" % (sys.executable, fname)) +p = popen("%s %s" % (sys.executable, fname)) output = p.read() p.close() vereq(output, """\ @@ -51,7 +51,7 @@ f = file(fname, "w") f.write(input) f.close() -p = os.popen("%s %s" % (sys.executable, fname)) +p = popen("%s %s" % (sys.executable, fname)) output = p.read() p.close() vereq(output, """\ @@ -59,4 +59,4 @@ indirect exit direct exit """) -os.unlink(fname) +unlink(fname) |