Rearrange test_socket_ssl so that a skip is expected iff the network
resource isn't enabled or the socket module doesn't support ssl.
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 075d83b..8169533 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -50,8 +50,11 @@
except os.error:
pass
+def is_resource_enabled(resource):
+ return use_resources is not None and resource in use_resources
+
def requires(resource, msg=None):
- if use_resources is not None and resource not in use_resources:
+ if not is_resource_enabled(resource):
if msg is None:
msg = "Use of the `%s' resource not enabled" % resource
raise TestSkipped(msg)