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)))
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)))
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)))
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
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
def firstFailure(self): if not self.failures: return None table = self.sortFailures(helper.cls_name(self.failures[0][0])) if table: return (table[0][1], table[0][2]) else: return None
def sortFailures(self, testClassName): table = list() for test, err in self.failures: if helper.cls_name(test) == testClassName: m = re.search("(?<= line )\d+" ,err) if m: tup = (int(m.group(0)), test, err) table.append(tup) if table: return sorted(table) else: return None
def sortFailures(self, testClassName): table = list() for test, err in self.failures: if helper.cls_name(test) == testClassName: m = re.search("(?<= line )\d+", err) if m: tup = (int(m.group(0)), test, err) table.append(tup) if table: return sorted(table) else: return None
def passesCount(self): return not (self.failures and helper.cls_name(self.failures[0][0]) != self.prevTestClassName)