On 03/12/11 09:56 AM, Jeroen Demeyer wrote:
On 2011-03-12 09:56, David Kirkby wrote:
I propose that when a doctest is written, there should be a comment in
the code, substantiating why the "Expected" result is correct. That
might take the form of at least all of the following, with hopefully
not too many of #7.
I agree that your idea makes sense but I'm afraid that adding all this
stuff will be a lot of effort
I can't see why it should add much effort, as really people should be making
sure their doctests are actually test the implementation of their software, and
*not* just the reproducibility of the result.
There have been several instances of where doctests have been found to be wrong,
and I suspect there are others, but we simply don't know about them.
and also greatly reduce readability of the
source code.
Point taken.
So if you want to do this, do it in an "out-of-band" way,
i.e. not in the doctests themselves.
So how about stating such information must be put on the trac ticket before it
can be given a positive review? The only thing I'd suggest needs adding to the
source code would be the type of test, and a ticket reference number where the
justification for the test is verified. Something like:
"VerificationMethod#3 - see trac #23455"
or whatever the case may be.
I listed 9 categories for tests - I don't know if there's any I missed.
Jeroen.
Dave
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
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