diff tests/basic_test_result.py @ 38621:f4a214300957

run-tests: add missing life-cycle methods on the example custom test result 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. Differential Revision: https://phab.mercurial-scm.org/D3899
author Boris Feld <boris.feld@octobus.net>
date Tue, 10 Jul 2018 08:25:04 +0200
parents c44ae5997869
children 2372284d9457
line wrap: on
line diff
--- a/tests/basic_test_result.py	Tue Jul 10 08:23:46 2018 +0200
+++ b/tests/basic_test_result.py	Tue Jul 10 08:25:04 2018 +0200
@@ -1,4 +1,4 @@
-from __future__ import print_function
+from __future__ import absolute_import, print_function
 
 import unittest
 
@@ -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