gabrielfalcao/lettuce — pull request #382 by rtkrruvinskiy (2013-09-03 15:09:35+00:00)
Title: Normalize after* hook behaviour

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.