def test_wantWriteError(self):
    "\n        `Connection` methods which generate output raise\n        `OpenSSL.SSL.WantWriteError` if writing to the connection's BIO\n        fail indicating a should-write state.\n        "
    (client_socket, server_socket) = socket_pair()
    msg = b'x'
    for i in range(((1024 * 1024) * 64)):
        try:
            client_socket.send(msg)
        except error as e:
            if (e.errno == EWOULDBLOCK):
                break
            raise
    else:
        pytest.fail('Failed to fill socket buffer, cannot test BIO want write')
    ctx = Context(TLSv1_METHOD)
    conn = Connection(ctx, client_socket)
    conn.set_connect_state()
    with pytest.raises(WantWriteError):
        conn.do_handshake()
`Connection` methods which generate output raise
`OpenSSL.SSL.WantWriteError` if writing to the connection's BIO
fail indicating a should-write state.
def test_wantWriteError(self):
    "\n        `Connection` methods which generate output raise\n        `OpenSSL.SSL.WantWriteError` if writing to the connection's BIO\n        fail indicating a should-write state.\n        "
    (client_socket, server_socket) = socket_pair()
    msg = b'x'
    for i in range(((1024 * 1024) * 64)):
        try:
            client_socket.send(msg)
        except error as e:
            if (e.errno == EWOULDBLOCK):
                break
            raise
    else:
        pytest.fail('Failed to fill socket buffer, cannot test BIO want write')
    ctx = Context(TLSv1_METHOD)
    conn = Connection(ctx, client_socket)
    conn.set_connect_state()
    with pytest.raises(WantWriteError):
        conn.do_handshake()