def test_stopTestRun_returns_results(self): # `MultiTestResult.stopTestRun` returns a tuple of all of the return # values the `stopTestRun`s that it forwards to. class Result(LoggingResult): def stopTestRun(self): super(Result, self).stopTestRun() return 'foo' multi_result = MultiTestResult(Result([]), Result([])) result = multi_result.stopTestRun() self.assertEqual(('foo', 'foo'), result)
def setUp(self): TestWithFakeExceptions.setUp(self) self.result1 = LoggingResult([]) self.result2 = LoggingResult([]) self.multiResult = MultiTestResult(self.result1, self.result2)
def makeResult(self): return MultiTestResult(TestResult(), TestResult())