[Python-checkins] cpython: Skip some tests that require server name indication (SNI)

christian.heimes python-checkins at python.org
Sun Dec 15 17:02:44 CET 2013


http://hg.python.org/cpython/rev/7d897144c39c
changeset:   87963:7d897144c39c
user:        Christian Heimes <christian at cheimes.de>
date:        Sun Dec 15 17:02:36 2013 +0100
summary:
  Skip some tests that require server name indication (SNI)

files:
  Lib/test/test_asyncio/test_events.py |  6 ++++++
  1 files changed, 6 insertions(+), 0 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
@@ -10,6 +10,9 @@
     import ssl
 except ImportError:
     ssl = None
+    HAS_SNI = False
+else:
+    from ssl import HAS_SNI
 import subprocess
 import sys
 import threading
@@ -666,6 +669,7 @@
         server.close()
 
     @unittest.skipIf(ssl is None, 'No ssl module')
+    @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
     def test_create_server_ssl_verify_failed(self):
         proto = None
 
@@ -694,6 +698,7 @@
         server.close()
 
     @unittest.skipIf(ssl is None, 'No ssl module')
+    @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
     def test_create_server_ssl_match_failed(self):
         proto = None
 
@@ -724,6 +729,7 @@
         server.close()
 
     @unittest.skipIf(ssl is None, 'No ssl module')
+    @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
     def test_create_server_ssl_verified(self):
         proto = None
 

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


More information about the Python-checkins mailing list