mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
Issue #3759: test_asyncore.py leaked handle.
Reviewed by Amaury Forgeot d'Arc
This commit is contained in:
parent
3e75d2336d
commit
3e7dd78344
1 changed files with 2 additions and 0 deletions
|
@ -389,6 +389,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)
|
||||
|
@ -402,6 +403,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue