[Python-checkins] r66162 - python/trunk/Lib/test/test_asyncore.py

hirokazu.yamamoto python-checkins at python.org
Tue Sep 2 22:36:44 CEST 2008


Author: hirokazu.yamamoto
Date: Tue Sep  2 22:36:44 2008
New Revision: 66162

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

Modified:
   python/trunk/Lib/test/test_asyncore.py

Modified: python/trunk/Lib/test/test_asyncore.py
==============================================================================
--- python/trunk/Lib/test/test_asyncore.py	(original)
+++ python/trunk/Lib/test/test_asyncore.py	Tue Sep  2 22:36:44 2008
@@ -389,6 +389,7 @@
         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)
@@ -402,6 +403,7 @@
             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)


More information about the Python-checkins mailing list