gh-115627: Fix ssl test_pha_required_nocert() (#117821)

Accept also BrokenPipeError error message.
This commit is contained in:
Victor Stinner 2024-04-12 20:41:16 +02:00 committed by GitHub
parent a97650912e
commit 069de14cb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -4537,7 +4537,11 @@ class TestPostHandshakeAuth(unittest.TestCase):
# server aborts connection with an error.
with self.assertRaisesRegex(
OSError,
'certificate required|EOF occurred|closed by the remote host|Connection reset by peer'
('certificate required'
'|EOF occurred'
'|closed by the remote host'
'|Connection reset by peer'
'|Broken pipe')
):
# receive CertificateRequest
data = s.recv(1024)