<div dir="ltr"><br><br><div class="gmail_quote">On Fri, May 8, 2015 at 11:54 AM Pierre-Yves David <<a href="mailto:pierre-yves.david@ens-lyon.org">pierre-yves.david@ens-lyon.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Pierre-Yves David <<a href="mailto:pierre-yves.david@fb.com" target="_blank">pierre-yves.david@fb.com</a>><br>
# Date 1431066024 25200<br>
#      Thu May 07 23:20:24 2015 -0700<br>
# Node ID dccc3de8c055f386a1dbfe72e86091251dbd0b50<br>
# Parent  c25b2adb3664cd3c488e2c53aab0c64100d40af7<br>
run-tests: when building json, use result.failures instead of result.faildata<br>
<br>
It is unclear to me why 'faildata' was used. Lets use the same kind of attribute<br>
as for the other groups.<br></blockquote><div><br></div><div>I think this needs to be described better. They don't seem to be equivalent. For example, "faildata" is not populated with failures that were accepted in interactive mode. addFailure(), which adds to "failures", is called from two places and I know too little to understand what kinds of failures would be added in each place and whether the same errors would be added to "faildata"</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
diff --git a/tests/run-tests.py b/tests/run-tests.py<br>
--- a/tests/run-tests.py<br>
+++ b/tests/run-tests.py<br>
@@ -1535,16 +1535,16 @@ class TextTestRunner(unittest.TextTestRu<br>
                                   'time': ('%0.3f' % timesd[<a href="http://tc.name" target="_blank">tc.name</a>][0]),<br>
                                   'cuser': ('%0.3f' % timesd[<a href="http://tc.name" target="_blank">tc.name</a>][1]),<br>
                                   'csys': ('%0.3f' % timesd[<a href="http://tc.name" target="_blank">tc.name</a>][2])}<br>
                     outcome[<a href="http://tc.name" target="_blank">tc.name</a>] = testresult<br>
<br>
-                for tc, err in sorted(result.faildata.iteritems()):<br>
+                for tc, error in result.failures:<br>
                     testresult = {'result': 'failure',<br>
-                                  'time': ('%0.3f' % timesd[tc][0]),<br>
-                                  'cuser': ('%0.3f' % timesd[tc][1]),<br>
-                                  'csys': ('%0.3f' % timesd[tc][2])}<br>
-                    outcome[tc] = testresult<br>
+                                  'time': ('%0.3f' % timesd[<a href="http://tc.name" target="_blank">tc.name</a>][0]),<br>
+                                  'cuser': ('%0.3f' % timesd[<a href="http://tc.name" target="_blank">tc.name</a>][1]),<br>
+                                  'csys': ('%0.3f' % timesd[<a href="http://tc.name" target="_blank">tc.name</a>][2])}<br>
+                    outcome[<a href="http://tc.name" target="_blank">tc.name</a>] = testresult<br>
<br>
                 for tc, reason in result.skipped:<br>
                     testresult = {'result': 'skip',<br>
                                   'time': ('%0.3f' % timesd[<a href="http://tc.name" target="_blank">tc.name</a>][0]),<br>
                                   'cuser': ('%0.3f' % timesd[<a href="http://tc.name" target="_blank">tc.name</a>][1]),<br>
_______________________________________________<br>
Mercurial-devel mailing list<br>
<a href="mailto:Mercurial-devel@selenic.com" target="_blank">Mercurial-devel@selenic.com</a><br>
<a href="http://selenic.com/mailman/listinfo/mercurial-devel" target="_blank">http://selenic.com/mailman/listinfo/mercurial-devel</a><br>
</blockquote></div></div>