Patchwork [2,of,2] run-tests: remove useless "failed" flag from addOutputMismatch()

login
register
mail settings
Submitter Yuya Nishihara
Date Feb. 14, 2016, 4:03 p.m.
Message ID <86d3161e576cfd10d8db.1455465815@mimosa>
Download mbox | patch
Permalink /patch/13187/
State Accepted
Delegated to: Pierre-Yves David
Headers show

Comments

Yuya Nishihara - Feb. 14, 2016, 4:03 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1452313346 -32400
#      Sat Jan 09 13:22:26 2016 +0900
# Node ID 86d3161e576cfd10d8db009425812412be536cb5
# Parent  0c6fec72e0616985e26c69d4794531c9ed33c5e8
run-tests: remove useless "failed" flag from addOutputMismatch()

It never be set to True.
Pierre-Yves David - Feb. 14, 2016, 4:32 p.m.
On 02/14/2016 04:03 PM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1452313346 -32400
> #      Sat Jan 09 13:22:26 2016 +0900
> # Node ID 86d3161e576cfd10d8db009425812412be536cb5
> # Parent  0c6fec72e0616985e26c69d4794531c9ed33c5e8
> run-tests: remove useless "failed" flag from addOutputMismatch()
>
> It never be set to True.

Sure, pushed to the clowncopter.

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1353,7 +1353,6 @@  class TestResult(unittest._TextTestResul
             return
 
         accepted = False
-        failed = False
         lines = []
 
         with iolock:
@@ -1394,7 +1393,7 @@  class TestResult(unittest._TextTestResul
                     else:
                         rename(test.errpath, '%s.out' % test.path)
                     accepted = True
-            if not accepted and not failed:
+            if not accepted:
                 self.faildata[test.name] = b''.join(lines)
 
         return accepted