Re: [Python-Dev] Purpose of Doctests [Was: Best practices for Enum]

---------- Forwarded message ---------- From: Olemis Lang <olemis@gmail.com> Date: Mon, 20 May 2013 11:33:42 -0500 Subject: Re: [Python-Dev] Purpose of Doctests [Was: Best practices for Enum] To: Antoine Pitrou <solipsis@pitrou.net> On 5/20/13, Antoine Pitrou <solipsis@pitrou.net> wrote:
On Sat, 18 May 2013 23:41:59 -0700 Raymond Hettinger <raymond.hettinger@gmail.com> wrote:
We should continue to encourage users to make thorough unit tests and to leave doctests for documentation. That said, it should be recognized that some testing is better than no testing. And doctests may be attractive in that regard because it is almost effortless to cut-and-paste a snippet from the interactive prompt. That isn't a best practice, but it isn't a worst practice either.
There are other reasons to hate doctest, such as the obnoxious error reporting. Having to wade through ten pages of output to find what went wrong is no fun.
+1 FWIW , while using dutest [1]_ each interactive example will be a test case and therefore the match for that particular assertion will be reported using the usual unittest output format .. [1] dutest (https://pypi.python.org/pypi/dutest) -- Regards, Olemis. Apacheā¢ Bloodhound contributor http://issues.apache.org/bloodhound Blog ES: http://simelo-es.blogspot.com/ Blog EN: http://simelo-en.blogspot.com/ Featured article:
participants (1)
-
Olemis Lang