示例#1
0
文件: test_zmqpy.py 项目: pfw/zmqpy
    def test_context_term(self):
        from zmqpy import Context

        c = Context()

        c.term()

        assert c.closed
        assert c.zmq_ctx == None
示例#2
0
文件: test_zmqpy.py 项目: pfw/zmqpy
    def test_context_socket_term(self):
        from zmqpy import Context, PAIR
        c = Context()
        socket = c.socket(PAIR)

        assert socket
        assert c.n_sockets == 1
        assert len(c._sockets) == 1
        assert not c.closed

        c.term()

        assert c.n_sockets == 0
        assert len(c._sockets) == 0
        assert socket.closed
示例#3
0
文件: test_zmqpy.py 项目: pfw/zmqpy
 def tearDown(self):
     from zmqpy import Context
     c = Context()
     c.term()