[Django]-Is it possible to run a single doctest in Django using "manage.py test"

1๐Ÿ‘

โœ…

I posted a small script that lets you run doctests in a specific file or module in your project. Running doctests from a specific file or module: LINK.

It makes sure that the correct testing environment is loaded (emulating what manage.py test does). Hope this helps.

๐Ÿ‘คaka

3๐Ÿ‘

I think the way python doctests work is to simply run all doctests in a module in the same interpreter instance.

I doubt that manage.py can alter that basic behavior of python doctests.

๐Ÿ‘คcethegeek

0๐Ÿ‘

Try it this way:

python -m doctest views.py
๐Ÿ‘คJohn Mee

Leave a comment