summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLib/test/regrtest.py5
-rw-r--r--Lib/test/test_support.py4
2 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 183c12b..2c09f63 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -115,10 +115,11 @@ def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0,
elif o in ('-l', '--findleaks'):
findleaks = 1
elif o in ('-u', '--use'):
- use_resources = [x.lower() for x in a.split(',')]
- for r in use_resources:
+ u = [x.lower() for x in a.split(',')]
+ for r in u:
if r not in ('largefile', 'network'):
usage(1, 'Invalid -u/--use option: %s' % a)
+ use_resources.extend(u)
if generate and verbose:
usage(2, "-g and -v don't go together!")
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)