On Wednesday, July 16, 2014 1:57:36 PM UTC-4, martin....@gmx.net wrote: > > On Wednesday, July 16, 2014 4:39:39 PM UTC+2, Volker Braun wrote: >> >> For better or worse, the decision is to doctest every method. >> > > Have there been any discussions about using tools like coverage.py > <http://nedbatchelder.com/code/coverage/> to ensure actual coverage of > actually executable code? Because with this, I would easily demonstrate > that all my methods are covered by my doctests. On the other hand, the > assumption that any method which has some tests actually gets tested in > full might be incorrect in many cases, so by adding more fine-grained > coverage tests we might catch untested branches as well as indirectly > tested methods. >
The reviewer checks that the tests are appropriate for each method. (And it is generally assumed that the author writes them in good faith.) On Wednesday, August 13, 2014 12:09:40 AM UTC-4, kcrisman wrote: > > > > For better or worse, the decision is to doctest every method. >> > >> > No exceptions? >> >> No exceptions. Admittedly, there are cases where this leads to write >> rather stupid doctests. However the rational I was given by William, >> and which I find compelling, is that it takes less time to write those >> doctests than to argue with the reviewer that this might, or not, be >> an exception. >> >> Also, even if it's a private function, it's useful for developers and >> maintainers to have an example of the simplest possible way to try and >> exercise the function. >> >> >> > +1 > +1 -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.