[pypy-svn] pypy default: Close the file explicitely to let the test pass on Windows
amauryfa
commits-noreply at bitbucket.org
Fri Feb 18 14:03:36 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r42162:c61667a961ac
Date: 2011-02-18 13:35 +0100
http://bitbucket.org/pypy/pypy/changeset/c61667a961ac/
Log: Close the file explicitely to let the test pass on Windows
diff --git a/lib-python/modified-2.7.0/test/test_mmap.py b/lib-python/modified-2.7.0/test/test_mmap.py
--- a/lib-python/modified-2.7.0/test/test_mmap.py
+++ b/lib-python/modified-2.7.0/test/test_mmap.py
@@ -582,7 +582,8 @@
m.close()
# Should not crash (Issue 5385)
- open(TESTFN, "wb").write("x"*10)
+ with open(TESTFN, "wb") as f:
+ f.write("x"*10)
f = open(TESTFN, "r+b")
m = mmap.mmap(f.fileno(), 0)
f.close()
More information about the Pypy-commit
mailing list