test_supvisorszmq.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:supvisors 作者: julien6387 项目源码 文件源码
def check_reception(self, header=None, data=None):
        """ The method tests that the message is received correctly
        or not received at all. """
        if header and data:
            # check that subscriber receives the message
            try:
                msg = self.subscriber.receive()
            except zmq.Again:
                self.fail('Failed to get {} status'.format(header))
            self.assertTupleEqual((header, data), msg)
        else:
            # check the non-reception of the Supvisors status
            with self.assertRaises(zmq.Again):
                self.subscriber.receive()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号