Fix tests if Python compiled without SSL (#5367)

This commit is contained in:
Andrew Svetlov 2018-01-28 00:00:37 +02:00 committed by GitHub
parent b2ec3615c8
commit 0f54e00e96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -2134,6 +2134,8 @@ class SendfileMixin:
port = support.find_unused_port() port = support.find_unused_port()
srv_proto = MySendfileProto(loop=self.loop, close_after=close_after) srv_proto = MySendfileProto(loop=self.loop, close_after=close_after)
if is_ssl: if is_ssl:
if not ssl:
self.skipTest("No ssl module")
srv_ctx = test_utils.simple_server_sslcontext() srv_ctx = test_utils.simple_server_sslcontext()
cli_ctx = test_utils.simple_client_sslcontext() cli_ctx = test_utils.simple_client_sslcontext()
else: else: