diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2015-08-05 02:53:21 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2015-08-05 02:53:21 (GMT) |
commit | a4777f1befa51c4f9c192c7390294e67667a8190 (patch) | |
tree | 1b61de29438a9a3c72bfed215be892693dade092 | |
parent | 0a8572800b08ee2598d3db2b7b24bd3884ba11cd (diff) | |
download | cpython-a4777f1befa51c4f9c192c7390294e67667a8190.zip cpython-a4777f1befa51c4f9c192c7390294e67667a8190.tar.gz cpython-a4777f1befa51c4f9c192c7390294e67667a8190.tar.bz2 |
Issue #24751: When running regrtest with '-w', don't fail if re-run succeeds.
-rwxr-xr-x | Lib/test/regrtest.py | 11 | ||||
-rw-r--r-- | Misc/NEWS | 7 |
2 files changed, 15 insertions, 3 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 2458a3d..eaf39bb 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -652,7 +652,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, if verbose2 and bad: print "Re-running failed tests in verbose mode" - for test in bad: + for test in bad[:]: print "Re-running test %r in verbose mode" % test sys.stdout.flush() try: @@ -662,8 +662,13 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, # print a newline separate from the ^C print break - except: - raise + else: + if ok[0] in {PASSED, ENV_CHANGED, SKIPPED, RESOURCE_DENIED}: + bad.remove(test) + else: + if bad: + print count(len(bad), "test"), "failed again:" + printlist(bad) if single: if next_single_test: @@ -149,6 +149,13 @@ Documentation - Issue #22155: Add File Handlers subsection with createfilehandler to Tkinter doc. Remove obsolete example from FAQ. Patch by Martin Panter. +Tests +----- + +- Issue #24751: When running regrtest with the ``-w`` command line option, + a test run is no longer marked as a failure if all tests succeed when + re-run. + What's New in Python 2.7.10? ============================ |