summaryrefslogtreecommitdiff
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-12-04 03:26:57 +0000
committerTim Peters <tim.peters@gmail.com>2002-12-04 03:26:57 +0000
commitb4ee4eb3b308d55bd0d8d5a1abb2015950934c77 (patch)
tree38ed792399ecfdd3d04857ca7c90d63c63719485 /Lib/test/test_support.py
parent6ee68d20b7b588e9b1438970b3d101fb04a8e65d (diff)
downloadcpython-git-b4ee4eb3b308d55bd0d8d5a1abb2015950934c77.tar.gz
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.
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 075d83b94a..81695330d2 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -50,8 +50,11 @@ def forget(modname):
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)