Issue 7324: add a sanity check to regrtest argument parsing to

catch the case of an option with no handler.
This commit is contained in:
R. David Murray 2009-11-15 00:04:32 +00:00
parent ca020bb7a7
commit da82689daa
2 changed files with 7 additions and 0 deletions

View File

@ -344,6 +344,10 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
print # Force a newline (just in case)
print json.dumps(result)
sys.exit(0)
else:
print >>sys.stderr, ("No handler for option {}. 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!")
if use_mp and trace:

View File

@ -1567,6 +1567,9 @@ Extension Modules
Tests
-----
- Issue #7324: add a sanity check to regrtest argument parsing to
catch the case of an option with no handler.
- Issue #7312: Add a -F flag to run the selected tests in a loop until
a test fails. Can be combined with -j.