[EMAIL PROTECTED] wrote:
> Philipp von Weitershausen wrote at 2006-7-6 18:29 +0200:
>> ... fixing a trivial error without a unit test ...
>> How would you make sure that your fix for even a "trivial"
>> NameError actually works? Perhaps you introduced another typo in the
> Obviously, I have considerable more confidence in my ability to
> fix bugs than you do...
Rest assured of my full confidence in your bug fixing abilities :).
>> Clearly, since the NameError didn't occur in any other tests, the
>> codepath hasn't been tested yet, so it should be no matter what.
> If the test is as trivial as the fix, then one can easily add it
> (if one is not confident that the bug is truely fixed).
I've read over texts (whether code or prose) a hundred times and
could've sworn there were no typos. I've been proven wrong just about as
many times. We're humans. We make mistakes. It's ok, though. That's why
we have tests :).
> If not, the about a quarter to half an hour timeframe is
> easily exhausted and if you insist on the test, you
> get neither the test nor the fix.
If you follow the argument that untested code is broken by definition,
then you essentially have no fix if you get a fix without knowing
whether it actually works.
Ok, not everyone might agree with this black and white way of seeing
things. As a physicist, I personally take it with Schrödinger: Code
that's untested is both working and broken at the same time. You'll only
find out when you actually run it. Running it is assured by tests, for
>> There's another aspect to tests for bugs: reproduceability. Especially
>> when fixing bugs I tend to write tests first in order to be absolutely
>> sure that I can reproduce the problem in an automated manner. Then
>> fixing the bug is "easy": Just make the test pass...
> You use the personal form correctly. Not everybody does it like you
Yup. That's fine. I know many people who DO do it that way, though. It
seems to be a common pattern for those who like to be able to reproduce
bugs before they fix them.
Anyways, I'll fix some bugs now instead of just blabbering about how I
like doing it...
Zope3-dev mailing list