def create_socket_pair(self):
    '\n        Creates a local socket listening on a random port.\n        '
    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    self.addCleanup(server.close)
    client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    self.addCleanup(client.close)
    return (server, client)
Creates a local socket listening on a random port.
def create_socket_pair(self):
    '\n        \n        '
    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    self.addCleanup(server.close)
    client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    self.addCleanup(client.close)
    return (server, client)