summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.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/regrtest.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/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py5
1 files changed, 3 insertions, 2 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!")