[pypy-commit] pypy default: close and trunctate file on test failure
mattip
noreply at buildbot.pypy.org
Sun Sep 7 23:31:59 CEST 2014
Author: mattip <matti.picus at gmail.com>
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
More information about the pypy-commit
mailing list