def verify(self, failIfImportErrors=True, checkReporterSetup=True): if checkReporterSetup: for v in 'setUpReporterCalled', 'tearDownReporterCalled': assert_(getattr(self, v), 'self.%s did not evaluate to non-zero' % (v,)) if failIfImportErrors: assert_(not self.importError) for n in self.names: assertEqual(self.startCtr[n], self.endCtr[n])
def endTest(self, tm): super(BogusReporter, self).endTest(tm) self.endCtr['test'] += 1 assertEqual(self.tm, tm)
def endClass(self, klass): super(BogusReporter, self).endClass(klass) self.endCtr['class'] += 1 assertEqual(self.klass, klass)
def endModule(self, mod): super(BogusReporter, self).endModule(mod) self.endCtr['module'] += 1 assertEqual(self.module, mod)