def testReraise(self): runners = test_dispatcher._CreateRunners( MockRunnerException, [_MockDevice('0'), _MockDevice('1')]) with self.assertRaises(TestException): test_dispatcher._RunAllTests(runners, self.test_collection_factory, 0)
def testRetry(self): runners = test_dispatcher._CreateRunners( MockRunnerFail, [_MockDevice('0'), _MockDevice('1')]) results, exit_code = test_dispatcher._RunAllTests( runners, self.test_collection_factory, 0) self.assertEqual(len(results.GetFail()), len(self.tests)) self.assertEqual(exit_code, constants.ERROR_EXIT_CODE)
def testRetry(self): runners = test_dispatcher._CreateRunners( MockRunnerFail, [_MockDevice('0'), _MockDevice('1')]) results, exit_code = test_dispatcher._RunAllTests( runners, self.test_collection_factory, 0) self.assertEqual(len(results.GetFail()), len(self.tests)) self.assertEqual(exit_code, exit_codes.ERROR)
def testReraise(self): runners = test_dispatcher._CreateRunners(MockRunnerException, ['0', '1']) with self.assertRaises(TestException): test_dispatcher._RunAllTests(runners, self.test_collection_factory, 0)
def testRun(self): runners = [MockRunner('0'), MockRunner('1')] results, exit_code = test_dispatcher._RunAllTests( runners, self.test_collection_factory, 0) self.assertEqual(len(results.GetPass()), len(self.tests)) self.assertEqual(exit_code, 0)
def testRun(self): runners = [MockRunner(_MockDevice('0')), MockRunner(_MockDevice('1'))] results, exit_code = test_dispatcher._RunAllTests( runners, self.test_collection_factory, 0) self.assertEqual(len(results.GetPass()), len(self.tests)) self.assertEqual(exit_code, 0)
def testRetry(self): runners = test_dispatcher._CreateRunners(MockRunnerFail, ['0', '1']) results, exit_code = test_dispatcher._RunAllTests( runners, self.test_collection_factory, 0) self.assertEqual(len(results.GetFail()), len(self.tests)) self.assertEqual(exit_code, constants.ERROR_EXIT_CODE)