doctest not seeing any of my doc tests

Fredrik Lundh fredrik at pythonware.com
Sun Sep 7 09:51:01 EDT 2008


Steven D'Aprano wrote:

> I have a function in my module:
> 
> def selftest(verbose=False):
>     import doctest
>     doctest.testmod(verbose=verbose)

what happens if you change the above to

   def selftest(verbose=False):
       import doctest, yourmodule
       doctest.testmod(yourmodule, verbose=verbose)

(where yourmodule is the name of your module, obviously)

</F>




More information about the Python-list mailing list