[TIP] testing: why bother?

Laura Creighton lac at openend.se
Wed Mar 23 08:33:19 PDT 2011

In a message of Wed, 23 Mar 2011 10:05:10 EST, skip at pobox.com writes:
>    Laura> I think that the most important reason to write tests is so th
>    Laura> they can write them _first_, and the code _later_.  This will
>    Laura> change the way they write code, so that they won't produce the
>    Laura> large, self-contained, too-tightly coupled messes, which just
>    Laura> happen to work, and which are a nightmare to refactor because
>    Laura> they don't decompose nicely.
>OTOH, writing tests first is also no guarantee that your code will be
>well-structured. <wink>

True. But I don't see certain classes of horrors with TDD.  Indeed the
most common sort of structuring problem I find, is simply not enough
structure.  But that is a lot easier to fix than the completely
undecomposable messes I was used to seeing all the time ...


More information about the testing-in-python mailing list