diff options
Diffstat (limited to 'Lib/test/test_support.py')
| -rw-r--r-- | Lib/test/test_support.py | 5 |
1 files changed, 4 insertions, 1 deletions
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 @@ 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) |
