summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_mmap.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index 49ec78b..6fecaf5 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -161,6 +161,7 @@ class MmapTests(unittest.TestCase):
pass
else:
self.fail("Able to resize readonly memory map")
+ f.close()
del m, f
self.assertEqual(open(TESTFN, "rb").read(), 'a'*mapsize,
"Readonly memory map data file was modified")
@@ -217,6 +218,7 @@ class MmapTests(unittest.TestCase):
"Copy-on-write test data file should not be modified.")
# Ensuring copy-on-write maps cannot be resized
self.assertRaises(TypeError, m.resize, 2*mapsize)
+ f.close()
del m, f
# Ensuring invalid access parameter raises exception
@@ -434,7 +436,7 @@ class MmapTests(unittest.TestCase):
f = open(TESTFN, "rb")
m = mmap.mmap(f.fileno(), mapsize, prot=mmap.PROT_READ)
self.assertRaises(TypeError, m.write, "foo")
-
+ f.close()
def test_error(self):
self.assert_(issubclass(mmap.error, EnvironmentError))