comma-separated list of words indicating the resources to test. Currently
only the following are defined:
+ all - Enable all special resources.
+
curses - Tests that use curses and will modify the terminal's
state and output modes.
import test_support
+
+RESOURCE_NAMES = ('curses', 'largefile', 'network')
+
+
def usage(code, msg=''):
print __doc__
if msg: print msg
elif o in ('-u', '--use'):
u = [x.lower() for x in a.split(',')]
for r in u:
- if r not in ('curses', 'largefile', 'network'):
- usage(1, 'Invalid -u/--use option: %s' % a)
+ if r == 'all':
+ use_resources = RESOURCE_NAMES
+ break
+ if r not in RESOURCE_NAMES:
+ usage(1, 'Invalid -u/--use option: ' + a)
use_resources.extend(u)
if generate and verbose:
usage(2, "-g and -v don't go together!")