def test_writeNotReentrant(self):
        class Server(Protocol):
            def dataReceived(self, bytes):
                self.transport.write("bytes")

        class Client(Protocol):
            ready = False

            def connectionMade(self):
                reactor.callLater(0, self.go)

            def go(self):
                self.transport.write("foo")
                self.ready = True

            def dataReceived(self, bytes):
                self.wasReady = self.ready
                self.transport.loseConnection()


        server = Server()
        client = Client()
        d = loopback.loopbackAsync(client, server)
        def cbFinished(ignored):
            self.assertTrue(client.wasReady)
        d.addCallback(cbFinished)
        return d
Retrieve all directories specified in an input file.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_loopback.py/LoopbackAsyncTestCase.test_writeNotReentrant--crossover with--dataset/ETHPy150Open chapmanb/bcbio-nextgen-vm/bcbiovm/docker/mounts.py/_get_directories