mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Committing Py3k version of changelist 64080 and 64257, along with updated tests
for smtpd, which required updating with the new semantics.
This commit is contained in:
parent
d51ee54a23
commit
d74900ebb5
8 changed files with 269 additions and 134 deletions
|
@ -28,6 +28,9 @@ class dummychannel:
|
|||
def __init__(self):
|
||||
self.socket = dummysocket()
|
||||
|
||||
def close(self):
|
||||
self.socket.close()
|
||||
|
||||
class exitingdummy:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
@ -382,8 +385,8 @@ if hasattr(asyncore, 'file_wrapper'):
|
|||
fd = os.open(TESTFN, os.O_RDONLY)
|
||||
w = asyncore.file_wrapper(fd)
|
||||
|
||||
self.assertEqual(w.fd, fd)
|
||||
self.assertEqual(w.fileno(), fd)
|
||||
self.assertNotEqual(w.fd, fd)
|
||||
self.assertNotEqual(w.fileno(), fd)
|
||||
self.assertEqual(w.recv(13), b"It's not dead")
|
||||
self.assertEqual(w.read(6), b", it's")
|
||||
w.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue