From: Gregory P. Smith Date: Sat, 16 Jan 2016 01:29:45 +0000 (-0800) Subject: Make the error message regex more lenient so that it matches both X-Git-Tag: v3.4.5rc1~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7b05a409d2835fa03acb5b7440f5551e725ec3d;p=thirdparty%2FPython%2Fcpython.git Make the error message regex more lenient so that it matches both "certificate verify failed " and "CERTIFICATE_VERIFY_FAILED " as some SSL libraries use different text than OpenSSL. --- diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index f1746043e770..e72b86e77c36 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -999,7 +999,7 @@ class EventLoopTestsMixin: with mock.patch.object(self.loop, 'call_exception_handler'): with test_utils.disable_logger(): with self.assertRaisesRegex(ssl.SSLError, - 'certificate verify failed '): + '(?i)certificate.verify.failed '): self.loop.run_until_complete(f_c) # execute the loop to log the connection error @@ -1033,7 +1033,7 @@ class EventLoopTestsMixin: with mock.patch.object(self.loop, 'call_exception_handler'): with test_utils.disable_logger(): with self.assertRaisesRegex(ssl.SSLError, - 'certificate verify failed '): + '(?i)certificate.verify.failed '): self.loop.run_until_complete(f_c) # execute the loop to log the connection error