annoying doctest problem
ned at nedbatchelder.com
Mon Jan 12 16:47:25 CET 2015
On 1/11/15 11:20 PM, gordianknot1981 at gmail.com wrote:
> It failed with an unknown reason that evaluate two expected equal value but got an unexpected result! I'm struggling with this problem for a long time. Did I did something wrong? And how do I to fix it?
> any help is appreciated. :)
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:
Ned Batchelder, http://nedbatchelder.com
More information about the Python-list