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

Method test_tcp4

Lib/test/test_socket.py:7333–7337  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7331 self.assertEqual(sock.recv(1024), b'foo')
7332
7333 def test_tcp4(self):
7334 port = socket_helper.find_unused_port()
7335 with socket.create_server(("", port)) as sock:
7336 self.echo_server(sock)
7337 self.echo_client(("127.0.0.1", port), socket.AF_INET)
7338
7339 @unittest.skipUnless(socket_helper.IPV6_ENABLED, 'IPv6 required for this test')
7340 def test_tcp6(self):

Callers

nothing calls this directly

Calls 3

echo_serverMethod · 0.95
echo_clientMethod · 0.95
create_serverMethod · 0.45

Tested by

no test coverage detected