Example #1
0
 def ClassifyTest(test_set, test):
     name = test.id()
     if args.positional_args:
         if _MatchesSelectedTest(name, args.positional_args,
                                 args.exact_test_filter):
             assert hasattr(test, '_testMethodName')
             method = getattr(test, test._testMethodName)  # pylint: disable=W0212
             if decorators.ShouldBeIsolated(method, possible_browser):
                 test_set.isolated_tests.append(typ.TestInput(name))
             else:
                 test_set.parallel_tests.append(typ.TestInput(name))
     else:
         assert hasattr(test, '_testMethodName')
         method = getattr(test, test._testMethodName)  # pylint: disable=W0212
         should_skip, reason = decorators.ShouldSkip(
             method, possible_browser)
         if should_skip and not args.run_disabled_tests:
             test_set.tests_to_skip.append(typ.TestInput(name, msg=reason))
         elif decorators.ShouldBeIsolated(method, possible_browser):
             test_set.isolated_tests.append(typ.TestInput(name))
         else:
             test_set.parallel_tests.append(typ.TestInput(name))
Example #2
0
 def ClassifyTestWithBrowser(test_set, test):
     if typ_runner.matches_filter(test):
         if typ_runner.should_skip(test):
             test_set.add_test_to_skip(test,
                                       'skipped because matched --skip')
             return
         assert hasattr(test, '_testMethodName')
         method = getattr(test, test._testMethodName)  # pylint: disable=protected-access
         should_skip, reason = decorators.ShouldSkip(
             method, possible_browser)
         if should_skip and not typ_runner.args.all:
             test_set.add_test_to_skip(test, reason)
         elif decorators.ShouldBeIsolated(method, possible_browser):
             test_set.add_test_to_run_isolated(test)
         else:
             test_set.add_test_to_run_in_parallel(test)
Example #3
0
 def ClassifyTestWithBrowser(test_set, test):
     name = test.id()
     if _SkipMatch(name, args.skip):
         test_set.tests_to_skip.append(
             typ.TestInput(name, 'skipped because matched --skip'))
         return
     if (not args.positional_args or _MatchesSelectedTest(
             name, args.positional_args, args.exact_test_filter)):
         assert hasattr(test, '_testMethodName')
         method = getattr(test, test._testMethodName)  # pylint: disable=protected-access
         should_skip, reason = decorators.ShouldSkip(
             method, possible_browser)
         if should_skip and not args.run_disabled_tests:
             test_set.tests_to_skip.append(typ.TestInput(name, msg=reason))
         elif decorators.ShouldBeIsolated(method, possible_browser):
             test_set.isolated_tests.append(typ.TestInput(name))
         else:
             test_set.parallel_tests.append(typ.TestInput(name))