Пример #1
0
 def addSuccess(self, test):
     if self.passesCount():
         MockableTestResult.addSuccess(self, test)
         self.stream.writeln( \
             "  {0}{1}{2} has expanded your awareness.{3}{4}" \
             .format(Fore.GREEN, Style.BRIGHT, test._testMethodName, \
             Fore.RESET, Style.NORMAL))
         self.pass_count += 1
Пример #2
0
 def addSuccess(self, test):
     if self.passesCount():
         MockableTestResult.addSuccess(self, test)
         self.stream.writeln( \
             "  {0}{1}{2} has expanded your awareness.{3}{4}" \
             .format(Fore.GREEN, Style.BRIGHT, test._testMethodName, \
             Fore.RESET, Style.NORMAL))
         self.pass_count += 1
Пример #3
0
    def startTest(self, test):
        MockableTestResult.startTest(self, test)

        if helper.cls_name(test) != self.prevTestClassName:
            self.prevTestClassName = helper.cls_name(test)
            if not self.failures:
                self.stream.writeln()
                self.stream.writeln("Thinking {0}".format(helper.cls_name(test)))
Пример #4
0
    def startTest(self, test):
        MockableTestResult.startTest(self, test)

        if helper.cls_name(test) != self.prevTestClassName:
            self.prevTestClassName = helper.cls_name(test)
            if not self.failures:
                self.stream.writeln()
                self.stream.writeln("Thinking {0}".format(
                    helper.cls_name(test)))
Пример #5
0
    def startTest(self, test):
        MockableTestResult.startTest(self, test)

        if helper.cls_name(test) != self.prevTestClassName:
            self.prevTestClassName = helper.cls_name(test)
            if not self.failures:
                self.stream.writeln()
                self.stream.writeln("{0}{1}Thinking {2}".format(
                    Fore.RESET, Style.NORMAL, helper.cls_name(test)))
Пример #6
0
 def addSuccess(self, test):
     if self.passesCount():
         MockableTestResult.addSuccess(self, test)
         import re
         test_method = re.sub('test_', '', test._testMethodName)
         self.stream.writeln( \
             " {0}{1} Good Job!! You have finished {2}.{3}{4}" \
             .format(Fore.GREEN, Style.BRIGHT, test_method, \
             Fore.RESET, Style.NORMAL))
         self.pass_count += 1
Пример #7
0
    def startTest(self, test):
        MockableTestResult.startTest(self, test)

        if helper.cls_name(test) != self.prevTestClassName:
            self.prevTestClassName = helper.cls_name(test)
            if not self.failures:
                self.stream.writeln()
                self.stream.writeln("{0}{1}Learning {2}".format(Fore.RESET, Style.NORMAL, helper.cls_name(test)))
                if helper.cls_name(test) not in ["AboutAsserts", "AboutExtraCredit"]:
                    self.lesson_pass_count += 1
Пример #8
0
    def startTest(self, test):
        MockableTestResult.startTest(self, test)

        if helper.cls_name(test) != self.prevTestClassName:
            self.prevTestClassName = helper.cls_name(test)
            if not self.failures:
                self.stream.writeln()
                self.stream.writeln("{0}{1}Thinking {2}".format(
                    Fore.RESET, Style.NORMAL, helper.cls_name(test)))
                if helper.cls_name(test) not in ['AboutAsserts', 'AboutExtraCredit']:
                    self.lesson_pass_count += 1
Пример #9
0
 def addSuccess(self, test):
     if self.passesCount():
         MockableTestResult.addSuccess(self, test)
         self.stream.writeln(
             "  {0}{1}{2} has expanded your awareness.{3}{4}".format(
                 Fore.GREEN, Style.BRIGHT, test._testMethodName, Fore.RESET,
                 Style.NORMAL))
         if not self.run_optional:
             self.pass_count += 1
         else:
             self.optional_pass_count += 1
Пример #10
0
    def addSuccess(self, test):
        if self.passesCount():
            MockableTestResult.addSuccess(self, test)
            import re

            test_method = re.sub("test_", "", test._testMethodName)
            self.stream.writeln(
                " {0}{1} Good Job!! You have finished {2}.{3}{4}".format(
                    Fore.GREEN, Style.BRIGHT, test_method, Fore.RESET, Style.NORMAL
                )
            )
            self.pass_count += 1
Пример #11
0
 def addFailure(self, test, err):
     MockableTestResult.addFailure(self, test, err)
Пример #12
0
 def addFailure(self, test, err):
     MockableTestResult.addFailure(self, test, err)
Пример #13
0
 def addSuccess(self, test):
     if self.passesCount():            
         MockableTestResult.addSuccess(self, test)
         self.stream.writeln("  {0} has expanded your awareness.".format(test._testMethodName))
         self.pass_count += 1
Пример #14
0
 def addSuccess(self, test):
     if self.passesCount():
         MockableTestResult.addSuccess(self, test)
         self.stream.writeln("  {0} has expanded your awareness.".format(
             test._testMethodName))
         self.pass_count += 1