Skip to content

Commit b7adf97

Browse files
vstinnerpicnixz
andauthored
Update Lib/test/test_ssl.py
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent f0a9469 commit b7adf97

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Lib/test/test_ssl.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4346,9 +4346,14 @@ def test_client_sigalgs_mismatch(self):
43464346
client_context.set_client_sigalgs("rsa_pss_rsae_sha256")
43474347
server_context.set_client_sigalgs("rsa_pss_rsae_sha384")
43484348

4349-
# gh-139504: Some systems return ConnectionResetError
4350-
# or BrokenPipeError on handshake failures
4351-
with self.assertRaises((ssl.SSLError, ConnectionResetError, BrokenPipeError)):
4349+
with self.assertRaises((
4350+
ssl.SSLError,
4351+
# On handshake failures, some systems raise a ConnectionResetError.
4352+
ConnectionResetError,
4353+
# On handshake failures, macOS may raise a BrokenPipeError.
4354+
# See https://github.com/python/cpython/issues/139504.
4355+
BrokenPipeError,
4356+
)):
43524357
server_params_test(client_context, server_context,
43534358
chatty=True, connectionchatty=True,
43544359
sni_name=hostname)

0 commit comments

Comments
 (0)