This one example (#12893) is a good illustration of how non-trivial a task it is to add doctests, and also how important it is to do so: not ony was a (small) bug found in one the the newly tested functions, but another bug was revealed somewhere else in Sage. So adding doctests is extremely likely to end up in identifying and (hopefully) fixing bugs, which can be hard and time-consuming, and certainly involves some knowledge of what the functions are really doing.
That said, there is also a use for the testing which (I think) David K did a while back which was to fire random input at random functions to see what happens, with somewhat embarrassing results for some function I wrote which have not all been fixed yet. (e.g. mwrank('0 0 0 0') hangs forever because -- as everyone is supposed to know -- mwrank wants 5 integers input, and it is waiting for a 5th, but will never get it. In this example I did write a patch which I thought solved the problem 19 months ago, but it was not approved and nothing has been done on that since....) John On 2 May 2012 01:26, Dr. David Kirkby <david.kir...@onetel.net> wrote: > On 05/ 1/12 10:33 PM, Benjamin Jones wrote: > >> Here [1] is a patch I just wrote to increase the doctest coverage of >> one file mentioned here (linear_code.py) to 100%. Please review! I'm >> going to work on the other files in that directory as I have time. >> >> [1] http://trac.sagemath.org/sage_trac/ticket/12893 >> >> -- >> Benjamin Jones >> > > Great. I'm not able to review it, but hopefully someone else can. > > > Dave > > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org