Hilarious dream-logic (was Re: [Twisted-Python] [patch] (etc)

Andrew Bennetts andrew-twisted at puzzling.org
Thu May 18 21:47:54 EDT 2006


On Thu, May 18, 2006 at 09:25:07PM +0200, Andrea Arcangeli wrote:
[...]
> 
> Specifically I never said unittest are a waste of time, I only said that
> I don't have time to write unittests and that lack of unittests should
> not prevent valid bugfixes to be included and I think this is a very
> reasonable development approach. We can argue about features or huge
> changes, but I think valid bugfixes should not require unittests.

We, the people that have to *maintain* Twisted, think valid bugfixes require
unittests.  Our experience is that without them, bugs are doomed to reoccur and
reoccur between releases as other bugs are "fixed" that we may as well not
pretend to have fixed it in the first place.

It's the same principle as commenting code and following cosmetic coding
standards about whitespace.  The presence of the test doesn't directly make the
software more correct -- you could delete it and the code would still work
exactly as it did with the test on the filesystem, and similarly ugly code and
uncommented code isn't necessarily buggy code.  But these things help
maintainers applying patches and developers doing new work keep it correct, and
avoid wasting their time wondering why an apparently innocuous change does
something unexpected.  And avoid wasting our time fixing the same bugs over and
over again.

This is why we are so strict about requiring tests with bug fixes.  You might
not have time to write the tests, but *we* don't have the time to deal with new
code without tests, even if it is apparently more correct.

Thus it is part of our coding standard now (although it hasn't been written down
anywhere I'm aware of, you have certainly been told it is on many occasions).
If you cannot follow the coding standards for a project, then don't be offended
if that project doesn't apply your patches.

-Andrew.





More information about the Twisted-Python mailing list