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

Method test_read_write_zero

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

Source from the content-addressed store, hash-verified

899 self.assertIn(rc, errors)
900
901 def test_read_write_zero(self):
902 # empty reads and writes now work, bpo-42854, bpo-31711
903 client_context, server_context, hostname = testing_context()
904 server = ThreadedEchoServer(context=server_context)
905 with server:
906 with client_context.wrap_socket(socket.socket(),
907 server_hostname=hostname) as s:
908 s.connect((HOST, server.port))
909 self.assertEqual(s.recv(0), b"")
910 self.assertEqual(s.send(b""), 0)
911
912
913class 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