You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a listener runs a keyword in the end_suite handler, in the context of that keyword, the in_teardown is false.
test.robot
*** Settings ***
Library ContextAccess.py
Suite Teardown Run Keywords In Teardown Should Be True
*** Test Cases ***
Placeholder
No Operation
Listener.py
from robot.libraries.BuiltIn import BuiltIn
ROBOT_LISTENER_API_VERSION = 2
def end_suite(name, attributes):
BuiltIn().run_keyword('In Teardown Should Be True')
ContextAccess.py
from robot.running.context import EXECUTION_CONTEXTS
from robot.libraries.BuiltIn import BuiltIn
def in_teardown_should_be_true():
BuiltIn().run_keyword('Should Be True',
EXECUTION_CONTEXTS.current.in_teardown)
Running robot --listener Listener.py .\test.robot results in a failure:
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
If a listener runs a keyword in the
end_suite
handler, in the context of that keyword, thein_teardown
is false.test.robot
Listener.py
ContextAccess.py
Running

robot --listener Listener.py .\test.robot
results in a failure:The text was updated successfully, but these errors were encountered: