[Solved]-How to call ipdb when a test fails in django testing?

10👍

If you pip install ipdbplugin and pip install django-nose, then add django_nose to your INSTALLED_APPS and set TEST_RUNNER = 'django_nose.NoseTestSuiteRunner', you can then call:

./manage.py test --ipdb

or

./manage.py test --ipdb-failures

See https://github.com/flavioamieiro/nose-ipdb and https://github.com/django-nose/django-nose for further details.

2👍

You’ll need to install the nose
and django-nose packages. After you configure django-nose for your project, the default test runner and test management command will be beefed up with the nose test runner supports.

Here’s a gist with the output of the python manage.py help test command that shows the impressive list of options you get for running tests after the setup.

2👍

You can use the django-pdb app. Only install in your settings project

👤Goin

Leave a comment