annoying doctest problem

gordianknot1981 at gordianknot1981 at
Mon Jan 12 19:34:51 CET 2015

> My recommendation is to use doctest to test the code samples that 
> naturally occur in your docstrings, but not to use it as a 
> general-purpose testing tool.  It has too many limitations and quirks, 
> and if you're going to write separate test methods anyway, why not just 
> write actual code?
> More detail here: 
"Docstrings may be good ways to explain what code does, but explaining and testing are two different tasks"......That's really to the point, and make sense. anyway, thanks for your article I benefit a lot from it.

More information about the Python-list mailing list