/opt/imh-python/lib/python3.9/site-packages/zmq/tests
NameSizeModeActions
asyncio/-0755rm
__pycache__/-0755rm
conftest.py3660644editdlrm
test_auth.py207120644editdlrm
test_cffi_backend.py94810644editdlrm
test_constants.py45700644editdlrm
test_context.py120270644editdlrm
test_cython.py10480644editdlrm
test_decorators.py94950644editdlrm
test_device.py61690644editdlrm
test_draft.py14710644editdlrm
test_error.py12600644editdlrm
test_etc.py5250644editdlrm
test_future.py111590644editdlrm
test_imports.py18050644editdlrm
test_includes.py10130644editdlrm
test_ioloop.py39650644editdlrm
test_log.py66970644editdlrm
test_message.py110910644editdlrm
test_monitor.py30440644editdlrm
test_monqueue.py82230644editdlrm
test_multipart.py9440644editdlrm
test_pair.py12600644editdlrm
test_poll.py72600644editdlrm
test_proxy_steerable.py39220644editdlrm
test_pubsub.py10890644editdlrm
test_reqrep.py18410644editdlrm
test_retry_eintr.py29600644editdlrm
test_security.py81410644editdlrm
test_socket.py216530644editdlrm
test_ssh.py2340644editdlrm
test_version.py13340644editdlrm
test_win32_shim.py17410644editdlrm
test_z85.py22320644editdlrm
test_zmqstream.py24390644editdlrm
__init__.py63820644editdlrm
Edit: /opt/imh-python/lib/python3.9/site-packages/zmq/tests/test_pubsub.py (1089B)
# Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. from random import Random import time from unittest import TestCase import zmq from zmq.tests import BaseZMQTestCase, have_gevent, GreenTest class TestPubSub(BaseZMQTestCase): pass # We are disabling this test while an issue is being resolved. def test_basic(self): s1, s2 = self.create_bound_pair(zmq.PUB, zmq.SUB) s2.setsockopt(zmq.SUBSCRIBE, b'') time.sleep(0.1) msg1 = b'message' s1.send(msg1) msg2 = s2.recv() # This is blocking! self.assertEqual(msg1, msg2) def test_topic(self): s1, s2 = self.create_bound_pair(zmq.PUB, zmq.SUB) s2.setsockopt(zmq.SUBSCRIBE, b'x') time.sleep(0.1) msg1 = b'message' s1.send(msg1) self.assertRaisesErrno(zmq.EAGAIN, s2.recv, zmq.NOBLOCK) msg1 = b'xmessage' s1.send(msg1) msg2 = s2.recv() self.assertEqual(msg1, msg2) if have_gevent: class TestPubSubGreen(GreenTest, TestPubSub): pass