summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-09-06 16:09:41 (GMT)
committerGuido van Rossum <guido@python.org>2001-09-06 16:09:41 (GMT)
commitfe3f6969f54cfd3df24f54572a809e0deb47064f (patch)
tree54bed5656b676735209096d287add9bf019f2b42 /Lib/test/test_support.py
parent6091cd61ce9d8343d405bdb3f09e80e8ac9447c8 (diff)
downloadcpython-fe3f6969f54cfd3df24f54572a809e0deb47064f.zip
cpython-fe3f6969f54cfd3df24f54572a809e0deb47064f.tar.gz
cpython-fe3f6969f54cfd3df24f54572a809e0deb47064f.tar.bz2
Two small changes to the resource usage option:
(1) Allow multiple -u options to extend each other (and the initial value of use_resources passed into regrtest.main()). (2) When a test is run stand-alone (not via regrtest.py), needed resources are always granted.
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 8539997..5391f68 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -20,7 +20,7 @@ class TestSkipped(Error):
"""
verbose = 1 # Flag set to 0 by regrtest.py
-use_resources = [] # Flag set to [] by regrtest.py
+use_resources = None # Flag set to [] by regrtest.py
def unload(name):
try:
@@ -38,7 +38,7 @@ def forget(modname):
pass
def requires(resource, msg=None):
- if resource not in use_resources:
+ if use_resources is not None and resource not in use_resources:
if msg is None:
msg = "Use of the `%s' resource not enabled" % resource
raise TestSkipped(msg)