declaration of variables?
Carlos Ribeiro
cribeiro at mail.inet.com.br
Mon Feb 24 22:23:32 EST 2003
JCM,
On Monday 24 February 2003 23:47, Christian Tismer wrote:
> jcm wrote:
> > Certainly tests are extremely useful, although if you're script is
> > small/simple enough, I think it's reasonable to go without.
>
> Please show me code that doesn't need unit tests.
> Either is is smaller than 100 lines, or it has bugs
> in its first implementation.
There is a point that has to be stressed - the key to good unit testing is
your *attitude*. You *have* to start from the assumption that your program
does have bugs, and that you are going to find *all* them. If you start with
the (often wrong) assumption that your program is correct (it has no bugs),
then you end up writing silly tests that don't catch anything. You also have
to remember that you must keep looking for more bugs after you found a few
ones. Never allow yourself to become lazy. Be paranoid, be vigilant -
lazyness toward your own code is a big mistake. Thats one of the reasons why
it is often easier to spot bugs on someone's else code (and vice-versa
<grin>).
Carlos Ribeiro
cribeiro at mail.inet.com.br
More information about the Python-list
mailing list