[Zope-Coders] How to get going :-)
Barry A. Warsaw
barry@zope.com
Fri, 28 Sep 2001 10:46:49 -0400
>>>>> "TP" == Tim Peters <tim@zope.com> writes:
TP> [Steve Alexander]
>> ... If I want to check in a bugfix, that poses the question of
>> why there is a bug to be fixed. That suggests the bug was not
>> covered by a test, and therefore, we need a test that proves
>> the bug is fixed, that would have failed before the bugfix.
>> Any thoughts on this?
TP> A bug is actually (at least) two bugs: the obvious bug, but
TP> also a bug in the test suite that failed to catch it (since a
TP> test suite's purpose is to catch bugs, a bug it misses is by
TP> defn. a failure of the test suite to do its job).
>> Can test suites get too bloaty?
TP> Indeed they can, but I'd say we're years away from that, and
TP> when they get to that point it's easy to trim that tests that
TP> haven't failed in the last 20 years <wink>.
Actually, you've touched on the real worth of unit tests, IMO. They
are an investment, and they become more valuable as time goes on. In
other systems, I've sometimes made a patch or enhancement that
surprised me by breaking some unrelated code, and I was pretty
thankful that I had a test that caught the case, even though it had
been passing for several years.
I'd say test suite bloat can be alleviated by other means than
removing tests, e.g. refactoring. But wouldn't it be a good `problem'
to have? :)
-Barry