def load_tests(_, _2, _3):
  project = web_components_project.WebComponentsProject()
  suite = module_test_case.DiscoverTestsInModule(
      project,
      project.telemetry_path)
  assert suite.countTestCases() > 0, 'Expected to find at least one test.'
  return suite
def load_tests(_, _2, _3):
  project = spy_project.SpyProject()
  suite = module_test_case.DiscoverTestsInModule(
      project,
      project.spy_path)
  assert suite.countTestCases() > 0, 'Expected to find at least one test.'
  return suite
Beispiel #3
0
def load_tests(loader, tests, pattern):
    tvcm_project = project_module.Project()
    suite = unittest.TestSuite()
    suite.addTest(
        module_test_case.DiscoverTestsInModule(tvcm_project,
                                               tvcm_project.tvcm_path))
    return suite
def load_tests(_, _2, _3):
    project = web_components_project.WebComponentsProject()
    if os.getenv('NO_TVCM'):
        suite = unittest.TestSuite()
    else:
        suite = module_test_case.DiscoverTestsInModule(project,
                                                       project.telemetry_path)
        assert suite.countTestCases(
        ) > 0, 'Expected to find at least one test.'
    return suite
    def testDiscoverAndRun(self):
        if test_runner.PY_ONLY_TESTS:
            return
        tvcm_project = project_module.Project()
        t = module_test_case.DiscoverTestsInModule(tvcm_project,
                                                   tvcm_project.tvcm_path)
        interesting_t = test_runner.FilterSuite(
            t, lambda x: x.id() ==
            'tvcm.unittest.test_case_test.parseFullyQualifiedName')

        # This test has to manualy call the run and setUp/tearDown methods
        # so that the Python unittest system doesn't suppress the failures.
        interesting_t.setUp()
        try:
            case = list(interesting_t)[0]
            assert case.id(
            ) == 'tvcm.unittest.test_case_test.parseFullyQualifiedName'
            case.runTest()
def load_tests(loader, tests, pattern):
    project = trace_viewer_project.TraceViewerProject()
    return module_test_case.DiscoverTestsInModule(project, project.src_path)