/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_pair.py (1260B)
# Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import zmq from zmq.tests import BaseZMQTestCase, have_gevent, GreenTest x = b' ' class TestPair(BaseZMQTestCase): def test_basic(self): s1, s2 = self.create_bound_pair(zmq.PAIR, zmq.PAIR) msg1 = b'message1' msg2 = self.ping_pong(s1, s2, msg1) self.assertEqual(msg1, msg2) def test_multiple(self): s1, s2 = self.create_bound_pair(zmq.PAIR, zmq.PAIR) for i in range(10): msg = i*x s1.send(msg) for i in range(10): msg = i*x s2.send(msg) for i in range(10): msg = s1.recv() self.assertEqual(msg, i*x) for i in range(10): msg = s2.recv() self.assertEqual(msg, i*x) def test_json(self): s1, s2 = self.create_bound_pair(zmq.PAIR, zmq.PAIR) o = dict(a=10,b=list(range(10))) o2 = self.ping_pong_json(s1, s2, o) def test_pyobj(self): s1, s2 = self.create_bound_pair(zmq.PAIR, zmq.PAIR) o = dict(a=10,b=range(10)) o2 = self.ping_pong_pyobj(s1, s2, o) if have_gevent: class TestReqRepGreen(GreenTest, TestPair): pass