]> granicus.if.org Git - python/commitdiff
Reorganized so the test is skipped if os.popen() doesn't exist (in stead of failing).
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 26 Jul 2002 11:33:49 +0000 (11:33 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 26 Jul 2002 11:33:49 +0000 (11:33 +0000)
Lib/test/test_atexit.py

index 64c4c3c68d70738d3781200d42372c02bee74450..9b93b6815b564ae99561462ddc09a9f8310eeb4d 100644 (file)
@@ -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)