def connectedServerAndClient(ServerClass, ClientClass,
                             clientTransportFactory=makeFakeClient,
                             serverTransportFactory=makeFakeServer,
                             debug=False):
    c = ClientClass()
    s = ServerClass()
    cio = clientTransportFactory(c)
    sio = serverTransportFactory(s)
    c.makeConnection(cio)
    s.makeConnection(sio)
    pump = IOPump(c, s, cio, sio, debug)
    # kick off server greeting, etc
    pump.flush()
    return c, s, pump
A naive primality test. 
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/iosim.py/connectedServerAndClient--crossover with--dataset/ETHPy150Open ooici/pyon/pyon/util/test/test_async.py/TestThreads.pyblock