annoying doctest problem
gordianknot1981 at gmail.com
gordianknot1981 at gmail.com
Mon Jan 12 13:34:51 EST 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:
> http://nedbatchelder.com/blog/200811/things_i_dont_like_about_doctest.html
------------------------------------------------------------
"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