On Jul 6, 2006, at 2:03 PM, Lennart Regebro wrote:

When I have introduced secondary bugs in my fixes (which occasionally
happened), then a unit test would not have helped. The reason was then
that the affected code was used in unanticipated ways -- and
because it was unanticipated, I would not have written a test for it.

Sure. The point of the tests is not to prevent this. The point of them
is mainly to make sure that the thing you fixed says fixed.

Or that you actually fixed the thing you set out to fix, because, as
part of the test writing process you has to actually reproduce the
problem.  I often learn quite a bit about bugs when trying to
reproduce them. Bugs that appear shallow often turn out to be
much deeper during this process.

The security problem we dealt with the other day turned out this
way.  It was only through testing that Tres found out that the problem
was much different than it appeared on the surface.

Also, I think the habit of testing is as important as anything else.
We should always feel a bit queasy about making a change without


Jim Fulton                      mailto:[EMAIL PROTECTED]                Python 
CTO                             (540) 361-1714                  
Zope Corporation        http://www.zope.com             http://www.zope.org

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to