def METHOD_NAME(self):
    # This should raise a RecursionLimit but in some
    # platforms (FreeBSD, win32) sometimes raises KeyError instead,
    # or just silently terminates the interpreter (=crashes).
    nodes = [Node() for i in range(500)]
    for n in nodes:
        n.connections = list(nodes)
        n.connections.remove(n)
    self.assertRaises((AttributeError, RuntimeError), cPickle.dumps, n)