def assertLog(self, steps, expectedLog): """Main function - args are the result steps of the function and the expected log that results.""" self.steps = steps d = retry.retryCall( self._function, self.expectedArgs, self.expectedKeywords, self._checkFailure, LoggingSleeper(self.log)) d.addCallbacks(self._logResult, self._logFailure) d.addCallback(self.checkLog, expectedLog) return d
def assertLog(self, steps, expectedLog): """Main function - args are the result steps of the function and the expected log that results.""" self.steps = steps d = retry.retryCall(self._function, self.expectedArgs, self.expectedKeywords, self._checkFailure, LoggingSleeper(self.log)) d.addCallbacks(self._logResult, self._logFailure) d.addCallback(self.checkLog, expectedLog) return d
def assertLog(self, steps, expectedLog): """Main function - args are the result steps of the function and the expected log that results.""" self.steps = steps try: value = yield retry.retryCall( self._function, self.expectedArgs, self.expectedKeywords, self._checkFailure, LoggingSleeper(self.log)) self.log.append(value) except Exception: # pylint: disable=W0703 self.log.append('failed') self.assertEquals(expectedLog, self.log)
def assertLog(self, steps, expectedLog): """Main function - args are the result steps of the function and the expected log that results.""" self.steps = steps try: value = yield retry.retryCall(self._function, self.expectedArgs, self.expectedKeywords, self._checkFailure, LoggingSleeper(self.log)) self.log.append(value) except Exception: # pylint: disable=W0703 self.log.append('failed') self.assertEquals(expectedLog, self.log)