diff options
author | Tulio Casagrande <tcasagra@thoughtworks.com> | 2016-12-02 11:45:01 -0200 |
---|---|---|
committer | Tulio Casagrande <tcasagra@thoughtworks.com> | 2016-12-02 11:45:01 -0200 |
commit | a8b7f37fc8087407408cb65b76fdcd7686c8d87c (patch) | |
tree | f1cb8e09509ee99fe154f00a653212f89e07129d /service | |
parent | 8b26f3f40e3f5d04a02528c81616a231d8f8428a (diff) |
Add support to run ipdb on error
See: https://github.com/pixelated/project-issues/issues/381
Diffstat (limited to 'service')
-rw-r--r-- | service/test/functional/features/environment.py | 8 |
1 files 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): |