Where did you learn to unit test? How did you learn?

Terry Reedy tjreedy at udel.edu
Tue Apr 29 12:22:58 EDT 2003


"Christopher Blunck" <blunck at gst.com> wrote in message
news:1147e466.0304290638.287687f6 at posting.google.com...
> However, when I download a python module, it frequently has unit
> tests.

This is now a requirement for acceptance of new modules.  Reviewing
the test module along with the modules itself and doc patches is part
of the review process.   Bug tests accompanying bug patches are also
encouraged.

> What advice can you offer on spreading the testing bug around?

Perhaps note that systematic testing has been aroung awhile.  I
believe the ADA validation test suite was written pretty early.
Python had a systematic syntax test at least by 1.3 (my first version)
and I presume much earlier.

> What success stories do you have?

As an observer, Python itself.  It has gone thru numerous releases
(15+) and has been ported to numerous platforms (20+? depending on how
count) over more than a decade without succumbing to bit rot.

It is my impression that the current code version gets tested daily on
a variety of platforms.  Every week or two, someone posts on PyDev
mailing list 'Test X failed on system Y.  Sometimes a patcher forgot
to run the appropriate test, sometimes there is negative interaction
with other modules or compilation units, sometimes there is a platform
specific problem (on a system different from the one used by the
patcher).

Usually, mis-patches are fixed within a day or two.  Sometimes they
are withdrawn for longer reconsideration.  In either case, there is
another enhancement bug that most of us never see and another success
for relentless retesting.

Terry J. Reedy






More information about the Python-list mailing list