[Python-checkins] cpython: test_imaplib: skip check_hostname test when SNI is not available
christian.heimes
python-checkins at python.org
Sun Dec 15 19:39:39 CET 2013
http://hg.python.org/cpython/rev/7670f8b4234c
changeset: 87965:7670f8b4234c
user: Christian Heimes <christian at cheimes.de>
date: Sun Dec 15 19:39:32 2013 +0100
summary:
test_imaplib: skip check_hostname test when SNI is not available
files:
Lib/test/test_imaplib.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
--- a/Lib/test/test_imaplib.py
+++ b/Lib/test/test_imaplib.py
@@ -18,6 +18,9 @@
import ssl
except ImportError:
ssl = None
+ HAS_SNI = False
+else:
+ from ssl import HAS_SNI
CERTFILE = None
CAFILE = None
@@ -349,6 +352,7 @@
imap_class = IMAP4_SSL
@reap_threads
+ @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
def test_ssl_verified(self):
ssl_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
ssl_context.verify_mode = ssl.CERT_REQUIRED
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list