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

Method test_do_handshake_enotconn

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

Source from the content-addressed store, hash-verified

4139 self.assertEqual(cm.exception.errno, errno.ENOTCONN)
4140
4141 def test_do_handshake_enotconn(self):
4142 context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
4143 context.check_hostname = False
4144 with context.wrap_socket(socket.socket()) as sock:
4145 with self.assertRaises(OSError) as cm:
4146 sock.do_handshake()
4147 self.assertEqual(cm.exception.errno, errno.ENOTCONN)
4148
4149 def test_no_shared_ciphers(self):
4150 client_context, server_context, hostname = testing_context()

Callers

nothing calls this directly

Calls 5

wrap_socketMethod · 0.95
socketMethod · 0.80
assertRaisesMethod · 0.45
do_handshakeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected