Author: mattip <[email protected]>
Branch: 
Changeset: r73364:3e93f5de92ea
Date: 2014-09-08 00:22 +0300
http://bitbucket.org/pypy/pypy/changeset/3e93f5de92ea/

Log:    close and trunctate file on test failure

diff --git a/lib-python/2.7/test/test_mmap.py b/lib-python/2.7/test/test_mmap.py
--- a/lib-python/2.7/test/test_mmap.py
+++ b/lib-python/2.7/test/test_mmap.py
@@ -186,6 +186,10 @@
             # later tests assume that the length hasn't changed.  We need to
             # repair that.
             if sys.platform.startswith('win'):
+                f.close()
+                f = open(TESTFN, 'r+b')
+                f.truncate(mapsize)
+                f.close()
                 self.fail("Opening mmap with size+1 should work on Windows.")
         else:
             # we expect a ValueError on Unix, but not on Windows
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to