[Python-checkins] python/dist/src/Lib/test test_atexit.py,1.3.24.2,1.3.24.3

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Thu, 10 Oct 2002 13:46:36 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv25976

Modified Files:
      Tag: release22-maint
	test_atexit.py 
Log Message:
Backport of 1.7:
Reorganized so the test is skipped if os.popen() doesn't exist (in stead of fail
ing).


Index: test_atexit.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_atexit.py,v
retrieving revision 1.3.24.2
retrieving revision 1.3.24.3
diff -C2 -d -r1.3.24.2 -r1.3.24.3
*** test_atexit.py	17 Jul 2002 00:42:52 -0000	1.3.24.2
--- test_atexit.py	10 Oct 2002 20:46:33 -0000	1.3.24.3
***************
*** 2,6 ****
  from test_support import TESTFN, vereq
  import atexit
! import os
  import sys
  
--- 2,6 ----
  from test_support import TESTFN, vereq
  import atexit
! from os import popen, unlink
  import sys
  
***************
*** 24,28 ****
  f.close()
  
! p = os.popen("%s %s" % (sys.executable, fname))
  output = p.read()
  p.close()
--- 24,28 ----
  f.close()
  
! p = popen("%s %s" % (sys.executable, fname))
  output = p.read()
  p.close()
***************
*** 52,56 ****
  f.close()
  
! p = os.popen("%s %s" % (sys.executable, fname))
  output = p.read()
  p.close()
--- 52,56 ----
  f.close()
  
! p = popen("%s %s" % (sys.executable, fname))
  output = p.read()
  p.close()
***************
*** 60,62 ****
  """)
  
! os.unlink(fname)
--- 60,62 ----
  """)
  
! unlink(fname)