summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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()