-
Normalize after* hook behaviour · 5b4e7c7c
Previously, the behaviour of after* hooks was inconsistent if an exception was raised. If a system-exiting exception was raised (e.g., KeyboardInterrupt, a result of pressing Ctrl-C), after_each.feature and after_each.scenario ran only in failfast mode, while after.outline never ran at all, and after_each.step always ran. after.outline never ran on any error when in failfast mode. This was undocumented, unexpected, and problematic, since the hooks can be used to clean up altered state, something we still want to happen even if the test is cancelled or a step fails. after_each.feature, after_each.scenario, after.outline and after_each.step hooks will now run on a step failure on a system-exiting exception in failfast mode and outside of failfast mode. The output plugins relied on the previous behaviour and have been modified to make sure the output format does not change. Tests have been added for the new hook behaviour.
Ray Ruvinskiy committed
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| system_exiting_error.feature | Loading commit data... | |
| system_exiting_error_steps.py | Loading commit data... |