From a8b7f37fc8087407408cb65b76fdcd7686c8d87c Mon Sep 17 00:00:00 2001 From: Tulio Casagrande Date: Fri, 2 Dec 2016 11:45:01 -0200 Subject: Add support to run ipdb on error See: https://github.com/pixelated/project-issues/issues/381 --- service/test/functional/features/environment.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/service/test/functional/features/environment.py b/service/test/functional/features/environment.py index a30f3221..d49016b6 100644 --- a/service/test/functional/features/environment.py +++ b/service/test/functional/features/environment.py @@ -127,8 +127,12 @@ def after_step(context, step): def _debug_on_error(context, step): if step.status == 'failed' and context.config.userdata.getbool("debug"): - import pdb - pdb.post_mortem(step.exc_traceback) + try: + import ipdb + ipdb.post_mortem(step.exc_traceback) + except ImportError: + import pdb + pdb.post_mortem(step.exc_traceback) def _save_screenshot(context, step): -- cgit v1.2.3