@pytest.mark.skipif((platform == 'darwin'), reason='connect_ex sometimes causes a kernel panic on OS X 10.6.4')
def test_connect_ex(self):
    '\n        If there is a connection error, `Connection.connect_ex` returns the\n        errno instead of raising an exception.\n        '
    port = socket_any_family()
    port.bind(('', 0))
    port.listen(3)
    clientSSL = Connection(Context(TLSv1_METHOD), socket(port.family))
    clientSSL.setblocking(False)
    result = clientSSL.connect_ex(port.getsockname())
    expected = (EINPROGRESS, EWOULDBLOCK)
    assert (result in expected)
If there is a connection error, `Connection.connect_ex` returns the
errno instead of raising an exception.
@pytest.mark.skipif((platform == 'darwin'), reason='connect_ex sometimes causes a kernel panic on OS X 10.6.4')
def test_connect_ex(self):
    '\n        If there is a connection error, `Connection.connect_ex` returns the\n        errno instead of raising an exception.\n        '
    port = socket_any_family()
    port.bind((, 0))
    port.listen(3)
    clientSSL = Connection(Context(TLSv1_METHOD), socket(port.family))
    clientSSL.setblocking(False)
    result = clientSSL.connect_ex(port.getsockname())
    expected = (EINPROGRESS, EWOULDBLOCK)
    assert (result in expected)