]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
asyncio, test_events: Ignore the "SSL handshake failed" log in debug mode
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 20 Nov 2014 13:19:23 +0000 (14:19 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 20 Nov 2014 13:19:23 +0000 (14:19 +0100)
Lib/test/test_asyncio/test_events.py

index b05cb7ca972e3dfb9496c3a6e69e6e0d9bf1bcfa..fab3259ffcab39d0a685f6947367822becfcf7cc 100644 (file)
@@ -634,7 +634,9 @@ class EventLoopTestsMixin:
         # 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')