Exemple #1
0
 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()
Exemple #2
0
 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()
Exemple #3
0
 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()
Exemple #4
0
 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()