'Test switching modes many times on the same data.'

def test_stackRecursion(self):

    proto = FlippingLineTester()
    transport = proto_helpers.StringIOWithoutClosing()
    proto.makeConnection(protocol.FileWrapper(transport))
    limit = sys.getrecursionlimit()
    proto.dataReceived(('x\nx' * limit))
    self.assertEqual(('x' * limit), ''.join(proto.lines))
