test_support.record_original_stdout(sys.stdout)
try:
- opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsSrf:lu:t:TD:NLR:wM:',
+ opts, args = getopt.getopt(sys.argv[1:], 'hvqxsSrf:lu:t:TD:NLR:wM:',
['help', 'verbose', 'quiet', 'exclude',
'single', 'slow', 'random', 'fromfile',
'findleaks', 'use=', 'threshold=', 'trace',
use_resources.remove(r)
elif r not in use_resources:
use_resources.append(r)
+ else:
+ print >>sys.stderr, ("No handler for option {0}. Please "
+ "report this as a bug at http://bugs.python.org.").format(o)
+ sys.exit(1)
if single and fromfile:
usage(2, "-s and -f don't go together!")
Tests
-----
+- Issue #7324: add a sanity check to regrtest argument parsing to
+ catch the case of an option with no handler.
+
- Issue #7295: Do not use a hardcoded file name in test_tarfile.
- Issue #7270: Add some dedicated unit tests for multi-thread synchronization