def addError(self, test, err): log.debug('Proxy addError %s %s', test, err) Result.addError(self, test, err) # compose a new error object that includes captured output if self.capt is not None and len(self.capt): ec, ev, tb = err ev = '\n'.join([str(ev) , ln('>> begin captured stdout <<'), self.capt, ln('>> end captured stdout <<')]) err = (ec, ev, tb) self.result.addError(test, err)
def addFailure(self, test, err): log.debug('Proxy addFailure %s %s', test, err) Result.addFailure(self, test, err) # compose a new error object that includes captured output # and assert introspection data ec, ev, tb = err if self.tbinfo is not None and len(self.tbinfo): ev = '\n'.join([str(ev), self.tbinfo]) if self.capt is not None and len(self.capt): ev = '\n'.join([str(ev) , ln('>> begin captured stdout <<'), self.capt, ln('>> end captured stdout <<')]) err = (ec, ev, tb) self.result.addFailure(test, err)
def stopTest(self, test): Result.stopTest(self, test) self.result.stopTest(test)
def startTest(self, test): Result.startTest(self, test) self.result.startTest(test)
def addSuccess(self, test): Result.addSuccess(self, test) self.result.addSuccess(test)