From: Neal Norwitz Date: Tue, 1 Jul 2003 13:44:28 +0000 (+0000) Subject: Fix SF bug #763770, test_socket_ssl crash X-Git-Tag: v2.3c1~211 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1787a0b1cc9679791a2fe775f63c322491c6767a;p=python Fix SF bug #763770, test_socket_ssl crash Don't run any tests if there is no ssl support. --- diff --git a/Lib/test/test_socket_ssl.py b/Lib/test/test_socket_ssl.py index ccb8318c47..544cdd90f1 100644 --- a/Lib/test/test_socket_ssl.py +++ b/Lib/test/test_socket_ssl.py @@ -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()