From: Guido van Rossum Date: Thu, 6 Sep 2001 09:54:47 +0000 (+0000) Subject: Skip instead of fail this test if the socket module has no ssl X-Git-Tag: v2.2a3~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b219b4a926905a1357a70db4309ba52e0d7447d;p=python Skip instead of fail this test if the socket module has no ssl support. --- diff --git a/Lib/test/test_socket_ssl.py b/Lib/test/test_socket_ssl.py index 86d4fa3547..334cbdfbd3 100644 --- a/Lib/test/test_socket_ssl.py +++ b/Lib/test/test_socket_ssl.py @@ -8,6 +8,9 @@ import test_support test_support.requires('network') import socket +if not hasattr(socket, "ssl"): + raise test_support.TestSkipped("socket module has no ssl support") + import urllib urllib.urlopen('https://sf.net')