]> granicus.if.org Git - python/commitdiff
I left some debugging junk in here; removed it. Also replaced a few
authorTim Peters <tim.peters@gmail.com>
Tue, 10 Sep 2002 21:19:55 +0000 (21:19 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 10 Sep 2002 21:19:55 +0000 (21:19 +0000)
more instances of the bizarre "del f; del m" ways to spell .close() (del
won't do any good here under Jython, etc).

Lib/test/test_mmap.py

index 26dbc4ac39419550e9d77d95c33ab61573906e2b..ea9c4eed4c68523e3fa6d98b56f2f7fd17c363eb 100644 (file)
@@ -221,11 +221,12 @@ def test_both():
         verify(m[:] == 'c'*mapsize,
                "Write-through memory map memory not updated properly.")
         m.flush()
-        del m, f
+        m.close()
+        f.close()
         f = open(TESTFN, 'rb')
         stuff = f.read()
         f.close()
-        verify(open(TESTFN, 'rb').read() == 'c'*mapsize,
+        verify(stuff == 'c'*mapsize,
                "Write-through memory map data file not updated properly.")
 
         print "  Opening mmap with access=ACCESS_COPY"