[Zope3-dev] Re: The bug fixing problem

Jim Fulton jim at zope.com
Fri Jul 7 07:04:17 EDT 2006


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

> On 7/6/06, dieter at handshake.de <dieter at handshake.de> 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
tests.

Jim

--
Jim Fulton			mailto:jim at zope.com		Python Powered!
CTO 				(540) 361-1714			http://www.python.org
Zope Corporation	http://www.zope.com		http://www.zope.org





More information about the Zope3-dev mailing list