Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 45 lines 1.8 kB view raw
1diff --git a/cheroot/test/test_ssl.py b/cheroot/test/test_ssl.py 2index fe8a0a0..92a77c1 100644 3--- a/cheroot/test/test_ssl.py 4+++ b/cheroot/test/test_ssl.py 5@@ -316,11 +316,9 @@ def test_tls_client_auth( 6 expected_ssl_errors = ( 7 requests.exceptions.SSLError, 8 OpenSSL.SSL.Error, 9- ) if PY34 else ( 10- requests.exceptions.SSLError, 11+ requests.exceptions.ConnectionError, 12 ) 13- if IS_WINDOWS: 14- expected_ssl_errors += requests.exceptions.ConnectionError, 15+ 16 with pytest.raises(expected_ssl_errors) as ssl_err: 17 make_https_request() 18 19@@ -335,7 +333,7 @@ def test_tls_client_auth( 20 except AttributeError: 21 if PY34: 22 pytest.xfail('OpenSSL behaves wierdly under Python 3.4') 23- elif six.PY3 and IS_WINDOWS: 24+ elif six.PY3: 25 err_text = str(ssl_err.value) 26 else: 27 raise 28@@ -348,8 +346,7 @@ def test_tls_client_auth( 29 if IS_MACOS and IS_PYPY and adapter_type == 'pyopenssl': 30 expected_substrings = ('tlsv1 alert unknown ca', ) 31 if ( 32- IS_WINDOWS 33- and tls_verify_mode in ( 34+ tls_verify_mode in ( 35 ssl.CERT_REQUIRED, 36 ssl.CERT_OPTIONAL, 37 ) 38@@ -361,6 +358,7 @@ def test_tls_client_auth( 39 "SysCallError(10054, 'WSAECONNRESET')", 40 "('Connection aborted.', " 41 'OSError("(10054, \'WSAECONNRESET\')"))', 42+ 'OSError("(104, \'ECONNRESET\')"))', 43 ) 44 assert any(e in err_text for e in expected_substrings) 45