[Python-checkins] python/dist/src/Lib/test test_mmap.py,1.29,1.30

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Mon, 13 Jan 2003 13:38:53 -0800


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

Modified Files:
	test_mmap.py 
Log Message:
A new test here was failing on Windows, because the test before it never
managed to delete the @test file it intended to delete.  Also, I don't
see a reason to create a 4MB file in the new test, so cut it back to 16K.


Index: test_mmap.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mmap.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** test_mmap.py	10 Jan 2003 20:52:16 -0000	1.29
--- test_mmap.py	13 Jan 2003 21:38:45 -0000	1.30
***************
*** 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)