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:
Josiah Carlson 2008-07-07 04:15:08 +00:00
parent d51ee54a23
commit d74900ebb5
8 changed files with 269 additions and 134 deletions

View file

@ -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()