changeset: 97257:6987a9c7dde9 branch: 2.7 user: Zachary Ware date: Tue Aug 04 21:53:21 2015 -0500 files: Lib/test/regrtest.py Misc/NEWS description: Issue #24751: When running regrtest with '-w', don't fail if re-run succeeds. diff -r 50ea0c4bfbee -r 6987a9c7dde9 Lib/test/regrtest.py --- a/Lib/test/regrtest.py Tue Aug 04 16:29:00 2015 -0700 +++ b/Lib/test/regrtest.py Tue Aug 04 21:53:21 2015 -0500 @@ -652,7 +652,7 @@ 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 @@ # 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: diff -r 50ea0c4bfbee -r 6987a9c7dde9 Misc/NEWS --- a/Misc/NEWS Tue Aug 04 16:29:00 2015 -0700 +++ b/Misc/NEWS Tue Aug 04 21:53:21 2015 -0500 @@ -149,6 +149,13 @@ - 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? ============================