Kaydet (Commit) 7aa42ea1 authored tarafından Hirokazu Yamamoto's avatar Hirokazu Yamamoto

Merged revisions 66162 via svnmerge from

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
........
üst 824f4f3c
...@@ -390,6 +390,7 @@ if hasattr(asyncore, 'file_wrapper'): ...@@ -390,6 +390,7 @@ if hasattr(asyncore, 'file_wrapper'):
def test_recv(self): def test_recv(self):
fd = os.open(TESTFN, os.O_RDONLY) fd = os.open(TESTFN, os.O_RDONLY)
w = asyncore.file_wrapper(fd) w = asyncore.file_wrapper(fd)
os.close(fd)
self.assertNotEqual(w.fd, fd) self.assertNotEqual(w.fd, fd)
self.assertNotEqual(w.fileno(), fd) self.assertNotEqual(w.fileno(), fd)
...@@ -403,6 +404,7 @@ if hasattr(asyncore, 'file_wrapper'): ...@@ -403,6 +404,7 @@ if hasattr(asyncore, 'file_wrapper'):
d2 = "I want to buy some cheese." d2 = "I want to buy some cheese."
fd = os.open(TESTFN, os.O_WRONLY | os.O_APPEND) fd = os.open(TESTFN, os.O_WRONLY | os.O_APPEND)
w = asyncore.file_wrapper(fd) w = asyncore.file_wrapper(fd)
os.close(fd)
w.write(d1) w.write(d1)
w.send(d2) w.send(d2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment