Hi, On Thu, Jul 28, 2011 at 10:13 AM, Ralf Gommers <ralf.gomm...@googlemail.com> wrote: > > > On Thu, Jul 28, 2011 at 1:29 AM, Gael Varoquaux > <gael.varoqu...@normalesup.org> wrote: >> >> On Wed, Jul 27, 2011 at 05:25:20PM -0600, Charles R Harris wrote: >> > Well, doc tests are just a losing proposition, no one should be using >> > them >> > for writing tests. It's not like this is a new discovery, doc tests >> > have >> > been known to be unstable for years. >> >> Untested documentation is broken in my experience. This is why I do rely >> a lot on doctests. > > Rely as in making sure that the examples run once in a while and before a > release is of course a good idea. Failures can be inspected and ignored if > there are only minor differences in string representation.
I think automated and frequent testing of the doctests considerably reduces the risk of broken documentation. If the code-base gets big enough, scanning the errors by eye isn't efficient, and the result can only be running the tests less often and detecting errors less often. > Relying on doctests as in "they replace the unit tests I should also have > written" is another thing altogether - unnecessary and expecting an > unrealistic level of backward compatibility. That of course doesn't mean > things in numpy should change without a good reason, but it seems there was > one. I don't think anyone suggested that doctests should replace unit tests; it's a bit difficult to see why that discussion started. Best, Matthew _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion