def test_sendAvoidsTimeout(self):
        # Let half the countdown period elapse
        self.clock.pump([0.0, 0.5, 1.0])
        self.failIf(self.proto.wrappedProtocol.disconnected)

        # Send some data (self.proto is the /real/ proto's transport, so this
        # is the write that gets called)
        self.proto.write('bytes bytes bytes')

        # More time passes, putting us past the original timeout
        self.clock.pump([0.0, 1.0, 1.0])
        self.failIf(self.proto.wrappedProtocol.disconnected)

        # Make sure writeSequence delays timeout as well
        self.proto.writeSequence(['bytes'] * 3)

        # Tick tock
        self.clock.pump([0.0, 1.0, 1.0])
        self.failIf(self.proto.wrappedProtocol.disconnected)

        # Don't write anything more, just let the timeout expire
        self.clock.pump([0.0, 2.0])
        self.failUnless(self.proto.wrappedProtocol.disconnected)
As a baseline for speed, parse some JSON.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/test/test_policies.py/TimeoutTestCase.test_sendAvoidsTimeout--crossover with--dataset/ETHPy150Open erikrose/parsimonious/parsimonious/tests/benchmarks.py/test_not_really_json_parsing