]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 61440-61441,61443,61445-61448,61451-61452,61455-61457,61459-61464...
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 1 Apr 2008 06:17:46 +0000 (06:17 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 1 Apr 2008 06:17:46 +0000 (06:17 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

................
  r62080 | martin.v.loewis | 2008-03-31 07:20:55 +0200 (Mo, 31 Mär 2008) | 9 lines

  Merged revisions 61990-62079 via svnmerge from
  svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

  ........
    r62017 | david.wolever | 2008-03-28 21:54:37 +0100 (Fr, 28 Mär 2008) | 1 line

    Fixed an out-of-date comment.
  ........
................
  r62084 | benjamin.peterson | 2008-03-31 23:57:13 +0200 (Mo, 31 Mär 2008) | 2 lines

  PyErr_Warn is decrepated. Use PyErr_WarnEx
................
  r62085 | neal.norwitz | 2008-04-01 07:40:43 +0200 (Di, 01 Apr 2008) | 4 lines

  Be sure to close the file.  2 places were deleting the file, so it was probably
  fine, but the last change may be required for the test to pass on Windows.
  Should we always close the mmap too?
................

Lib/lib2to3/tests/test_fixers.py
Lib/test/test_mmap.py

index 3b2945c875830ac0cc51a13975149aeaf5ea5a40..bd0dc5802a74c14a7bd9f1cd927aff9e930f9d15 100755 (executable)
@@ -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
index fdd75ab988bf444d847a6fe4e6c70adb1c1aaac7..f01b9df4f7cf45111a5199c4dd216c1be88701fe 100644 (file)
@@ -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))