コード例 #1
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)
コード例 #2
0
 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)
コード例 #3
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, exit_codes.ERROR)
コード例 #4
0
 def testCreate(self):
     runners = test_dispatcher._CreateRunners(MockRunner, ['0', '1'])
     for runner in runners:
         self.assertEqual(runner.setups, 1)
     self.assertEqual(set([r.device_serial for r in runners]),
                      set(['0', '1']))
     self.assertEqual(set([r.shard_index for r in runners]), set([0, 1]))
コード例 #5
0
 def testCreate(self):
   runners = test_dispatcher._CreateRunners(MockRunner, ['0', '1'])
   for runner in runners:
     self.assertEqual(runner.setups, 1)
   self.assertEqual(set([r.device_serial for r in runners]),
                    set(['0', '1']))
   self.assertEqual(set([r.shard_index for r in runners]),
                    set([0, 1]))
コード例 #6
0
 def testReraise(self):
   runners = test_dispatcher._CreateRunners(MockRunnerException, ['0', '1'])
   with self.assertRaises(TestException):
     test_dispatcher._RunAllTests(runners, self.test_collection_factory, 0)
コード例 #7
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)