summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2009-11-15 00:17:17 +0000
committerR. David Murray <rdmurray@bitdance.com>2009-11-15 00:17:17 +0000
commit693618cd7b661a9af5b5d7a97795123536a29cb6 (patch)
tree3155b6f8aedb74e2371f681b7a2d4e173867e675
parent384a4fc0e6a71dbfcf4ab5582c00fe2489a7abf9 (diff)
downloadcpython-git-693618cd7b661a9af5b5d7a97795123536a29cb6.tar.gz
Merged revisions 76276-76277 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76276 | r.david.murray | 2009-11-14 19:04:32 -0500 (Sat, 14 Nov 2009) | 3 lines Issue 7324: add a sanity check to regrtest argument parsing to catch the case of an option with no handler. ........ r76277 | r.david.murray | 2009-11-14 19:07:00 -0500 (Sat, 14 Nov 2009) | 3 lines Remove 'g' from regrtest getopt argument string, since there's no handler for it. ........
-rwxr-xr-xLib/test/regrtest.py6
-rw-r--r--Misc/NEWS3
2 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index fde5ff4fca..7077787607 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -205,7 +205,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
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',
@@ -285,6 +285,10 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
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!")
diff --git a/Misc/NEWS b/Misc/NEWS
index b60752915b..a8eeaf200d 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -82,6 +82,9 @@ Build
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