19 from robot.utils import get_error_message, glob_escape
35 class GatherFailedSuites(SuiteVisitor):
41 if any(test.failed
for test
in suite.tests):
54 gatherer = GatherFailedTests()
55 tests_or_tasks =
'tests or tasks'
59 tests_or_tasks =
'tests' if not suite.rpa
else 'tasks'
60 if not gatherer.tests
and not empty_suite_ok:
61 raise DataError(
'All %s passed.' % tests_or_tasks)
63 raise DataError(
"Collecting failed %s from '%s' failed: %s"
74 if not gatherer.suites
and not empty_suite_ok:
77 raise DataError(
"Collecting failed suites from '%s' failed: %s"
79 return gatherer.suites
def visit_test(self, test)
def visit_keyword(self, kw)
def start_suite(self, suite)
def visit_keyword(self, kw)
def visit_test(self, test)
def gather_failed_tests(output, empty_suite_ok=False)
def gather_failed_suites(output, empty_suite_ok=False)
def ExecutionResult(*sources, **options)
Factory method to constructs :class:~.executionresult.Result objects.
def get_error_message()
Returns error message of the last occurred exception.