MCPcopy
hub / github.com/zeromq/pyzmq / test_bind_connect_addr_error

Method test_bind_connect_addr_error

tests/test_socket.py:154–164  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

152 ctx.term()
153
154 def test_bind_connect_addr_error(self):
155 with self.socket(zmq.PUSH) as s:
156 url = "tcp://1.2.3.4.5:1234567"
157 with pytest.raises(zmq.ZMQError) as exc:
158 s.bind(url)
159 assert url in str(exc.value)
160
161 url = "noproc://no/such/file"
162 with pytest.raises(zmq.ZMQError) as exc:
163 s.connect(url)
164 assert url in str(exc.value)
165
166 def test_identity(self):
167 s = self.context.socket(zmq.PULL)

Callers

nothing calls this directly

Calls 3

socketMethod · 0.45
bindMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected