16 from contextlib
import contextmanager
45 return (context.namespace
for context
in self)
47 def start_suite(self, suite, namespace, output, dry_run=False):
64 _started_keywords_threshold = 100
66 def __init__(self, suite, namespace, output, dry_run=False):
102 self.
variablesvariablesvariables.set_keyword(
'${KEYWORD_STATUS}',
'FAIL' if error
else 'PASS')
113 self.
namespacenamespace.start_user_keyword()
117 self.
namespacenamespace.end_user_keyword()
122 if not parent
or parent.source != handler.source:
123 self.
warnwarn(f
"Keyword '{handler.longname}' is private and should only "
124 f
"be called by keywords in the same file.")
135 in_teardown = property
150 for index, parent
in enumerate(reversed(parents)):
151 if (parent.tags.robot(
'recursive-stop-on-failure')
152 or index == 0
and parent.tags.robot(
'stop-on-failure')):
154 if (parent.tags.robot(
'recursive-continue-on-failure')
155 or index == 0
and parent.tags.robot(
'continue-on-failure')):
160 allow_loop_control = property
163 for typ
in reversed(self.
step_typesstep_types):
164 if typ ==
'ITERATION':
171 for name
in [
'${PREV_TEST_NAME}',
172 '${PREV_TEST_STATUS}',
173 '${PREV_TEST_MESSAGE}']:
177 EXECUTION_CONTEXTS.end_suite()
203 if timeout
in self.
timeoutstimeouts:
204 self.
timeoutstimeouts.remove(timeout)
218 raise DataError(
'Maximum limit of started keywords and control '
219 'structures exceeded.')
221 if keyword.libname !=
'BuiltIn':
222 self.
step_typesstep_types.append(keyword.type)
227 if keyword.libname !=
'BuiltIn':
def start_suite(self, suite, namespace, output, dry_run=False)
def continue_on_failure(self, default=False)
int _started_keywords_threshold
def start_test(self, test)
def timeout(self, timeout)
def set_suite_variables(self, suite)
def keyword_teardown(self, error)
def report_suite_status(self, status, message)
def test_teardown(self, test)
def _add_timeout(self, timeout)
def user_keyword(self, handler)
def _remove_timeout(self, timeout)
def end_suite(self, suite)
def start_keyword(self, keyword)
def end_keyword(self, keyword)
def warn_on_invalid_private_call(self, handler)
def __init__(self, suite, namespace, output, dry_run=False)
def get_runner(self, name)