summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-04-23 23:07:28 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-04-23 23:07:28 (GMT)
commite12cda98407801a8857775b46f49ca8ef85c1fad (patch)
tree7a581565ca4a35052bb99e27a26ce802338beb4a
parent906569de2484fd9962b6e052cce5bb791e72cd86 (diff)
downloadcpython-e12cda98407801a8857775b46f49ca8ef85c1fad.zip
cpython-e12cda98407801a8857775b46f49ca8ef85c1fad.tar.gz
cpython-e12cda98407801a8857775b46f49ca8ef85c1fad.tar.bz2
test_mmap started breaking on Windows, only when run after test_bsddb.
On Win2K it thought 'foo' started at byte offset 0 instead of at the pagesize, and on Win98 it thought 'foo' didn't exist at all. Somehow or other this is related to the new "in memory file" gimmicks in bsddb, but the old bsddb we use on Windows sucks so bad anyway I don't want to bother digging deeper. Flushing the file in test_mmap after writing to it makes the problem go away, so good enough.
-rw-r--r--Lib/test/test_mmap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index fcf3c92..4fb4ec1 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -17,7 +17,7 @@ def test_both():
f.write('\0'* PAGESIZE)
f.write('foo')
f.write('\0'* (PAGESIZE-3) )
-
+ f.flush()
m = mmap.mmap(f.fileno(), 2 * PAGESIZE)
f.close()