mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-37322: ssl test_pha_required_nocert() ignores expected SSLError (GH-14670)
test_ssl.test_pha_required_nocert() now uses
support.catch_threading_exception() to ignore the expected SSLError
in ConnectionHandler of ThreadedEchoServer (it is only raised
sometimes on Windows).
(cherry picked from commit 73ea54620a
)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
This commit is contained in:
parent
bbad695e78
commit
4c403b8ca2
1 changed files with 18 additions and 15 deletions
|
@ -4320,6 +4320,9 @@ class TestPostHandshakeAuth(unittest.TestCase):
|
|||
server_context.verify_mode = ssl.CERT_REQUIRED
|
||||
client_context.post_handshake_auth = True
|
||||
|
||||
# Ignore expected SSLError in ConnectionHandler of ThreadedEchoServer
|
||||
# (it is only raised sometimes on Windows)
|
||||
with support.catch_threading_exception() as cm:
|
||||
server = ThreadedEchoServer(context=server_context, chatty=False)
|
||||
with server:
|
||||
with client_context.wrap_socket(socket.socket(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue