summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-04-18 04:30:18 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-04-18 04:30:18 (GMT)
commit5379dea2a7ad0639ce15d06a198f71990d039462 (patch)
tree5c23cc8f8f9147ff8f84f7b90fb15f01443130b0 /Lib
parent2b858971899ae0572f0610e4a8d59241471c6771 (diff)
downloadcpython-5379dea2a7ad0639ce15d06a198f71990d039462.zip
cpython-5379dea2a7ad0639ce15d06a198f71990d039462.tar.gz
cpython-5379dea2a7ad0639ce15d06a198f71990d039462.tar.bz2
SF bug 544733: Cygwin test_mmap fix for Python 2.2.1
Close a file before trying to unlink it, and apparently Cygwin needs writes to an mmap'ed file to get flushed before they're visible. Bugfix candidate, but I think only for the 2.2 line (it's testing features that I think were new in 2.2).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_mmap.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index 0f34758..fcf3c92 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -238,6 +238,7 @@ def test_both():
pass
else:
verify(0, "Incompatible parameters should raise ValueError.")
+ f.close()
finally:
try:
os.unlink(TESTFN)
@@ -252,6 +253,7 @@ def test_both():
data = 'aabaac\x00deef\x00\x00aa\x00'
n = len(data)
f.write(data)
+ f.flush()
m = mmap.mmap(f.fileno(), n)
f.close()