[Python-checkins] cpython (merge 3.4 -> 3.5): Make the error message regex more lenient so that it matches both

gregory.p.smith python-checkins at python.org
Fri Jan 15 20:31:11 EST 2016


https://hg.python.org/cpython/rev/fe2ad01aad02
changeset:   99914:fe2ad01aad02
branch:      3.5
parent:      99908:07a615a8f9ad
parent:      99913:0364c4a74b96
user:        Gregory P. Smith <greg at krypto.org>
date:        Fri Jan 15 17:30:24 2016 -0800
summary:
  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.

files:
  Lib/test/test_asyncio/test_events.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -999,7 +999,7 @@
         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 @@
         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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list