]> granicus.if.org Git - python/commitdiff
Merged revisions 66162 via svnmerge from
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Tue, 2 Sep 2008 20:41:25 +0000 (20:41 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Tue, 2 Sep 2008 20:41:25 +0000 (20:41 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66162 | hirokazu.yamamoto | 2008-09-03 05:36:44 +0900 | 2 lines

  Issue #3759: test_asyncore.py leaked handle.
  Reviewed by Amaury Forgeot d'Arc
........

Lib/test/test_asyncore.py

index 450eee15cc44ea980f1a7481960d58c63eac6ab1..12ef247a0e3035b2d42d28c32df141f46dbc407f 100644 (file)
@@ -390,6 +390,7 @@ if hasattr(asyncore, 'file_wrapper'):
         def test_recv(self):
             fd = os.open(TESTFN, os.O_RDONLY)
             w = asyncore.file_wrapper(fd)
+            os.close(fd)
 
             self.assertNotEqual(w.fd, fd)
             self.assertNotEqual(w.fileno(), fd)
@@ -403,6 +404,7 @@ if hasattr(asyncore, 'file_wrapper'):
             d2 = "I want to buy some cheese."
             fd = os.open(TESTFN, os.O_WRONLY | os.O_APPEND)
             w = asyncore.file_wrapper(fd)
+            os.close(fd)
 
             w.write(d1)
             w.send(d2)