コード例 #1
0
 def testLoadAllTestsInModule(self):
   tests = serially_executed_browser_test_case.LoadAllTestsInModule(
       sys.modules[__name__])
   self.assertEquals(sorted([t.id() for t in tests]),
       ['telemetry.testing.browser_test_runner_unittest.Algebra.TestNumber',
        'telemetry.testing.browser_test_runner_unittest.Algebra.testOne',
        'telemetry.testing.browser_test_runner_unittest.Algebra.testTwo',
        'telemetry.testing.browser_test_runner_unittest.Geometric.TestAngle',
        'telemetry.testing.browser_test_runner_unittest.Geometric.testBasic'])
コード例 #2
0
 def testLoadAllTestsInModule(self):
   context = browser_test_context.TypTestContext()
   context.finder_options = options_for_unittests.GetCopy()
   context.test_class = Algebra
   context.test_case_ids_to_run.add(
     'telemetry.testing.browser_test_runner_unittest.Algebra.TestNumber')
   context.test_case_ids_to_run.add(
     'telemetry.testing.browser_test_runner_unittest.Algebra.testOne')
   context.Freeze()
   browser_test_context._global_test_context = context
   try:
     # This should not invoke GenerateTestCases of ErrorneousGeometric class,
     # otherwise that would throw Exception.
     tests = serially_executed_browser_test_case.LoadAllTestsInModule(
         sys.modules[__name__])
     self.assertEquals(sorted([t.id() for t in tests]),
         ['telemetry.testing.browser_test_runner_unittest.Algebra.TestNumber',
          'telemetry.testing.browser_test_runner_unittest.Algebra.testOne'])
   finally:
     browser_test_context._global_test_context = None
コード例 #3
0
def load_tests(loader, tests, pattern):
    del loader, tests, pattern  # Unused.
    return serially_executed_browser_test_case.LoadAllTestsInModule(
        sys.modules[__name__])
コード例 #4
0
def load_tests(loader, tests, pattern): # pylint: disable=invalid-name
  del loader, tests, pattern  # Unused.
  return serially_executed_browser_test_case.LoadAllTestsInModule(
      sys.modules[__name__])
コード例 #5
0
def LoadAllTestsInModule(module):
    # Just delegates to serially_executed_browser_test_case to reduce the
    # number of imports in other files.
    return serially_executed_browser_test_case.LoadAllTestsInModule(module)
コード例 #6
0
def load_tests(*_):
    return serially_executed_browser_test_case.LoadAllTestsInModule(
        sys.modules[__name__])