Patchwork D3899: run-tests: add missing life-cycle methods on the example custom test result

login
register
mail settings
Submitter phabricator
Date July 10, 2018, 6:25 a.m.
Message ID <differential-rev-PHID-DREV-qwvdrdniizawn4lycjrh-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32727/
State Superseded
Headers show

Comments

phabricator - July 10, 2018, 6:25 a.m.
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  A previous commit introduced `onStart` and `onEnd` methods on test result but
  the one used in tests lacked those two methods. Fix it and add some output to
  be sure they are called.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3899

AFFECTED FILES
  tests/basic_test_result.py

CHANGE DETAILS




To: lothiraldan, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/basic_test_result.py b/tests/basic_test_result.py
--- a/tests/basic_test_result.py
+++ b/tests/basic_test_result.py
@@ -39,6 +39,12 @@ 
     def addIgnore(self, test, reason):
         print("IGNORE!", test, reason)
 
+    def onStart(self, test):
+        print("ON_START!", test)
+
+    def onEnd(self):
+        print("ON_END!")
+
     def addOutputMismatch(self, test, ret, got, expected):
         return False