summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLib/test/regrtest.py4
-rw-r--r--Misc/NEWS3
2 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 0ee8bcc..c2677d2 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -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:
diff --git a/Misc/NEWS b/Misc/NEWS
index 8a7b78d..53945e9 100644
--- 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