def startTest(self, test): super(TextTestResult, self).startTest(test) if self.showAll: self.stream.write("{0} ".format(display_status('run'))) self.stream.write(print_test_description( self.getDescription(test))) self.stream.flush()
def addFailure(self, test, err): super(TextTestResult, self).addFailure(test, err) if self.showAll: self.stream.write("\r{0} ".format(display_status('FAIL'))) self.stream.write(print_test_description( self.getDescription(test))) self.stream.write("\n") elif self.dots: self.stream.write('F') self.stream.flush()
def addSuccess(self, test): super(TextTestResult, self).addSuccess(test) if self.showAll: self.stream.write("\r{0} ".format(display_status('ok'))) self.stream.write(print_test_description( self.getDescription(test))) self.stream.write("\n") elif self.dots: self.stream.write('.') self.stream.flush()
def addSkip(self, test, reason): super(TextTestResult, self).addSkip(test, reason) if self.showAll: self.stream.write("\r{0} ".format(display_status('SKIP'))) self.stream.write(print_test_description( self.getDescription(test))) self.stream.write(" {} ".format(display_skip(reason))) self.stream.write("\n") elif self.dots: self.stream.write("s") self.stream.flush()