summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLib/lib2to3/tests/test_fixers.py2
-rw-r--r--Lib/test/test_mmap.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/lib2to3/tests/test_fixers.py b/Lib/lib2to3/tests/test_fixers.py
index 3b2945c..bd0dc58 100755
--- a/Lib/lib2to3/tests/test_fixers.py
+++ b/Lib/lib2to3/tests/test_fixers.py
@@ -3139,7 +3139,7 @@ class Test_import(FixerTestCase):
def setUp(self):
FixerTestCase.setUp(self)
- # Need to replace fix_import's isfile and isdir method
+ # Need to replace fix_import's exists method
# so we can check that it's doing the right thing
self.files_checked = []
self.always_exists = True
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index fdd75ab..f01b9df 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -158,6 +158,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(), b'a'*mapsize,
"Readonly memory map data file was modified")
@@ -214,6 +215,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
@@ -433,7 +435,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))