| Server IP : 217.160.0.212 / Your IP : 216.73.216.141 Web Server : Apache System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/zmq/tests/ |
Upload File : |
# Copyright (C) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.
import pytest
import zmq
import zmq.constants
def test_constants():
assert zmq.POLLIN is zmq.PollEvent.POLLIN
assert zmq.PUSH is zmq.SocketType.PUSH
assert zmq.constants.SUBSCRIBE is zmq.SocketOption.SUBSCRIBE
def test_socket_options():
assert zmq.IDENTITY is zmq.SocketOption.ROUTING_ID
assert zmq.IDENTITY._opt_type is zmq.constants._OptType.bytes
assert zmq.AFFINITY._opt_type is zmq.constants._OptType.int64
assert zmq.CURVE_SERVER._opt_type is zmq.constants._OptType.int
assert zmq.FD._opt_type is zmq.constants._OptType.fd
@pytest.mark.parametrize("event_name", list(zmq.Event.__members__))
def test_event_reprs(event_name):
event = getattr(zmq.Event, event_name)
assert event_name in repr(event)