I've started integrating doctests into my modules. (Hooray!) These tend to be files which started as scripts, and are now are a few functions with CLI apps in the __name__=='__main__'
, so I don't want to put the running of the tests there. I tried nosetests --with-doctest
, but get lots of failures I don't want to see, because some of these modules require importing things I don't have installed on this system, or should be run within special python installations in where wrappers to an open application are exposed. Is there a way I can run just all of my doctests?
I've considered a hotkey in vim to run "import doctest; doctest.testfile(currentFilename)" to run my doctests in the current module, and another script that runs all the tests - what do other doctest users do? Or should I be using something other than doctest?