def after_step(context, step):
# from https://github.com/behave/behave/blob/master/docs/tutorial.rst#
# debug-on-error-in-case-of-step-failures
# and https://stackoverflow.com/a/22344473/399726
if BEHAVE_DEBUG_ON_ERROR and step.status == "failed":
# -- ENTER DEBUGGER: Zoom in on failure location.
# NOTE: Use IPython debugger, same for pdb (basic python debugger).
import ipdb
ipdb.post_mortem(step.exc_traceback)
评论列表
文章目录