]> granicus.if.org Git - python/commitdiff
Merged revisions 76279 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Sun, 15 Nov 2009 00:35:37 +0000 (00:35 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Sun, 15 Nov 2009 00:35:37 +0000 (00:35 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r76279 | r.david.murray | 2009-11-14 19:23:21 -0500 (Sat, 14 Nov 2009) | 10 lines

  Merged revisions 76276 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.
  ........
................

Lib/test/regrtest.py
Misc/NEWS

index 0ee8bcc7b9a8c3fd93e9d138ecd9f003ca1ee58c..c2677d220472d50b4e717caedd4f46c17b80b13c 100755 (executable)
@@ -330,6 +330,10 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
                 for m in [msvcrt.CRT_WARN, msvcrt.CRT_ERROR, msvcrt.CRT_ASSERT]:
                     msvcrt.CrtSetReportMode(m, msvcrt.CRTDBG_MODE_FILE)
                     msvcrt.CrtSetReportFile(m, msvcrt.CRTDBG_FILE_STDERR)
+        else:
+            print(("No handler for option {}.  Please report this as a bug "
+                  "at http://bugs.python.org.").format(o), file=sys.stderr)
+            sys.exit(1)
     if generate and verbose:
         usage("-g and -v don't go together!")
     if single and fromfile:
index 8a7b78d1a4ff4a01252733c2e10765be8d93dfe4..53945e9f31d64b74af67441c3b77bab3018ba5f6 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -149,6 +149,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 #6551: test_zipimport could import and then destroy some modules of
   the encodings package, which would make other tests fail further down
   the road because the internally cached encoders and decoders would point