[Python-checkins] cpython (3.4): asyncio, test_events: Ignore the "SSL handshake failed" log in debug mode

victor.stinner python-checkins at python.org
Thu Nov 20 14:20:43 CET 2014


https://hg.python.org/cpython/rev/ab7b942dfaa8
changeset:   93517:ab7b942dfaa8
branch:      3.4
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Nov 20 14:19:23 2014 +0100
summary:
  asyncio, test_events: Ignore the "SSL handshake failed" log in debug mode

files:
  Lib/test/test_asyncio/test_events.py |  4 +++-
  1 files changed, 3 insertions(+), 1 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
@@ -634,7 +634,9 @@
         # validation will fail
         with self.assertRaises(ssl.SSLError) as cm:
             conn_fut = create_connection(ssl=True)
-            self._basetest_create_ssl_connection(conn_fut, check_sockname)
+            # Ignore the "SSL handshake failed" log in debug mode
+            with test_utils.disable_logger():
+                self._basetest_create_ssl_connection(conn_fut, check_sockname)
 
         self.assertEqual(cm.exception.reason, 'CERTIFICATE_VERIFY_FAILED')
 

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


More information about the Python-checkins mailing list