Fix SF bug #763770, test_socket_ssl crash

Don't run any tests if there is no ssl support.
This commit is contained in:
Neal Norwitz 2003-07-01 13:44:28 +00:00
parent 9c8f78deab
commit 1787a0b1cc
1 changed files with 2 additions and 2 deletions

View File

@ -11,8 +11,6 @@ skip_expected = not (test_support.is_resource_enabled('network') and
def test_basic():
test_support.requires('network')
if not hasattr(socket, "ssl"):
raise test_support.TestSkipped("socket module has no ssl support")
import urllib
@ -61,6 +59,8 @@ def test_rude_shutdown():
connector()
def test_main():
if not hasattr(socket, "ssl"):
raise test_support.TestSkipped("socket module has no ssl support")
test_rude_shutdown()
test_basic()