MCPcopy Index your code
hub / github.com/RustPython/RustPython / echo_client

Method echo_client

Lib/test/test_socket.py:7326–7331  ·  view source on GitHub ↗
(self, addr, family)

Source from the content-addressed store, hash-verified

7324 event.set()
7325
7326 def echo_client(self, addr, family):
7327 with socket.socket(family=family) as sock:
7328 sock.settimeout(self.timeout)
7329 sock.connect(addr)
7330 sock.sendall(b'foo')
7331 self.assertEqual(sock.recv(1024), b'foo')
7332
7333 def test_tcp4(self):
7334 port = socket_helper.find_unused_port()

Callers 4

test_tcp4Method · 0.95
test_tcp6Method · 0.95

Calls 6

socketMethod · 0.80
settimeoutMethod · 0.45
connectMethod · 0.45
sendallMethod · 0.45
assertEqualMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected