]> granicus.if.org Git - python/commitdiff
Skip instead of fail this test if the socket module has no ssl
authorGuido van Rossum <guido@python.org>
Thu, 6 Sep 2001 09:54:47 +0000 (09:54 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 6 Sep 2001 09:54:47 +0000 (09:54 +0000)
support.

Lib/test/test_socket_ssl.py

index 86d4fa3547f1530b7ebd78b7a84afbc8a247b169..334cbdfbd33abc40fe3eaf181ec2590743468dcf 100644 (file)
@@ -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')