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


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


./manage.py test --ipdb-failures

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


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.


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


Leave a comment