[Python-checkins] python/dist/src/Lib/test test_mmap.py,1.32,1.33

birkenfeld@users.sourceforge.net birkenfeld at users.sourceforge.net
Wed Aug 24 09:17:50 CEST 2005


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20685/Lib/test

Modified Files:
	test_mmap.py 
Log Message:
bug [ 728515 ] mmap's resize method resizes the file in win32 but not unix



Index: test_mmap.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mmap.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- test_mmap.py	28 Mar 2005 01:08:04 -0000	1.32
+++ test_mmap.py	24 Aug 2005 07:17:40 -0000	1.33
@@ -120,6 +120,14 @@
             else:
                 verify(0, 'Could seek beyond the new size')
 
+            # Check that the underlying file is truncated too
+            # (bug #728515)
+            f = open(TESTFN)
+            f.seek(0, 2)
+            verify(f.tell() == 512, 'Underlying file not truncated')
+            f.close()
+            verify(m.size() == 512, 'New size not reflected in file') 
+
         m.close()
 
     finally:



More information about the Python-checkins mailing list