[Python-checkins] python/dist/src/Lib/test test_mmap.py,1.19.8.6,1.19.8.7

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
2003年3月31日 14:48:32 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv20802/Lib/test
Modified Files:
 Tag: release22-maint
	test_mmap.py 
Log Message:
This was failing on Windows, due to various attempts to delete files
that were still open. Made the tail end of the test look more like
the CVS head version.
Index: test_mmap.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mmap.py,v
retrieving revision 1.19.8.6
retrieving revision 1.19.8.7
diff -C2 -d -r1.19.8.6 -r1.19.8.7
*** test_mmap.py	10 Jan 2003 21:02:41 -0000	1.19.8.6
--- test_mmap.py	31 Mar 2003 22:48:29 -0000	1.19.8.7
***************
*** 291,300 ****
 vereq(m.find(slice), data.find(slice))
 vereq(m.find(slice + 'x'), -1)
 
 finally:
! try:
! os.unlink(TESTFN)
! except OSError:
! pass
 
 # make sure a double close doesn't crash on Solaris (Bug# 665913)
--- 291,298 ----
 vereq(m.find(slice), data.find(slice))
 vereq(m.find(slice + 'x'), -1)
+ m.close()
 
 finally:
! os.unlink(TESTFN)
 
 # make sure a double close doesn't crash on Solaris (Bug# 665913)
***************
*** 302,310 ****
 
 try: # unlink TESTFN no matter what
! f.write(2**24 * 'a') # Arbitrary character
 f.close()
 
 f = open(TESTFN)
! mf = mmap.mmap(f.fileno(), 2**24, access=mmap.ACCESS_READ)
 mf.close()
 mf.close()
--- 300,308 ----
 
 try: # unlink TESTFN no matter what
! f.write(2**16 * 'a') # Arbitrary character
 f.close()
 
 f = open(TESTFN)
! mf = mmap.mmap(f.fileno(), 2**16, access=mmap.ACCESS_READ)
 mf.close()
 mf.close()
***************
*** 312,319 ****
 
 finally:
! try:
! os.unlink(TESTFN)
! except OSError:
! pass
 
 
--- 310,314 ----
 
 finally:
! os.unlink(TESTFN)
 
 

AltStyle によって変換されたページ (->オリジナル) /