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: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7b219b4a926905a1357a70db4309ba52e0d7447d;p=thirdparty%2FPython%2Fcpython.git 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 86d4fa3547f1..334cbdfbd33a 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')