'ctx.destroy should succeed when cyclic ref prevents gc'

def test_cyclic_destroy(self):

    class CyclicReference(object, ):
        def __init__(self, parent=None):
            self.parent = parent
        def crash(self, sock):
            self.sock = sock
            self.child = CyclicReference(self)
    def crash_zmq():
        ctx = self.Context()
        sock = ctx.socket(zmq.PULL)
        c = CyclicReference()
        c.crash(sock)
        ctx.destroy()
    crash_zmq()
