MCPcopy Index your code
hub / github.com/python/cpython / test_tcp4

Method test_tcp4

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

Source from the content-addressed store, hash-verified

7421 self.assertEqual(sock.recv(1024), b'foo')
7422
7423 def test_tcp4(self):
7424 port = socket_helper.find_unused_port()
7425 with socket.create_server(("", port)) as sock:
7426 self.echo_server(sock)
7427 self.echo_client(("127.0.0.1", port), socket.AF_INET)
7428
7429 @unittest.skipUnless(socket_helper.IPV6_ENABLED, 'IPv6 required for this test')
7430 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