def printErrors(self): succ = self.testsRun - (len(self.errors) + len(self.failures)) v = Colorise.bold("%3d" % succ) cv = Colorise.green(v) if succ == self.testsRun else Colorise.red(v) count = self.TEST_RESULTS_WIDTH - self.testsRun print_((" " * count) + cv) self.printErrorList('ERROR', self.errors) self.printErrorList('FAIL', self.failures)
def addSuccess(self, test): unittest.TestResult.addSuccess(self, test) print_(Colorise.green(self.CHAR_SUCCESS), end="")