server.close()
client.close()
+ @skipIfNonUnix
def test_inline_read_error(self):
# An error on an inline read is raised without logging (on the
# assumption that it will eventually be noticed or logged further
# up the stack).
+ #
+ # This test is posix-only because windows os.close() doesn't work
+ # on socket FDs, but we can't close the socket object normally
+ # because we won't get the error we want if the socket knows
+ # it's closed.
server, client = self.make_iostream_pair()
try:
os.close(server.socket.fileno())
class _ResolverTestMixin(object):
def test_localhost(self):
+ # Note that windows returns IPPROTO_IP unless we specifically
+ # ask for IPPROTO_TCP (either will work to create a socket,
+ # but this test looks for an exact match)
self.resolver.getaddrinfo('localhost', 80, socket.AF_UNSPEC,
socket.SOCK_STREAM,
+ socket.IPPROTO_TCP,
callback=self.stop)
future = self.wait()
self.assertIn(