I want to run Python’s doctest on a .txt file (ie, not on docstring), but I don’t want to go to the command line.
python -m doctest myfile.txt
The reason I don’t want to do it from the command line is that I just don’t want to leave Visual Studio. I want to run it with F5 and then see my output in VS as well.
Question: How can I run doctest from a .py file, then, not from the command line?
check out doctest.testfile. I think that will do what you want…
Here’s the some of the source from
doctest.pyfor example usage: