Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1787a0b

Browse files
committed
Fix SF bug #763770, test_socket_ssl crash
Don't run any tests if there is no ssl support.
1 parent 9c8f78d commit 1787a0b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_socket_ssl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
def test_basic():
1313
test_support.requires('network')
14-
if not hasattr(socket, "ssl"):
15-
raise test_support.TestSkipped("socket module has no ssl support")
1614

1715
import urllib
1816

@@ -61,6 +59,8 @@ def connector():
6159
connector()
6260

6361
def test_main():
62+
if not hasattr(socket, "ssl"):
63+
raise test_support.TestSkipped("socket module has no ssl support")
6464
test_rude_shutdown()
6565
test_basic()
6666

0 commit comments

Comments
 (0)