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

Method test_read_write_zero

Lib/test/test_ssl.py:982–991  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

980 self.assertIn(rc, errors)
981
982 def test_read_write_zero(self):
983 # empty reads and writes now work, bpo-42854, bpo-31711
984 client_context, server_context, hostname = testing_context()
985 server = ThreadedEchoServer(context=server_context)
986 with server:
987 with client_context.wrap_socket(socket.socket(),
988 server_hostname=hostname) as s:
989 s.connect((HOST, server.port))
990 self.assertEqual(s.recv(0), b"")
991 self.assertEqual(s.send(b""), 0)
992
993
994class ContextTests(unittest.TestCase):

Callers

nothing calls this directly

Calls 8

testing_contextFunction · 0.85
ThreadedEchoServerClass · 0.85
wrap_socketMethod · 0.80
socketMethod · 0.80
connectMethod · 0.45
assertEqualMethod · 0.45
recvMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected