[FRPythoneers] Doctest

Jim Vickroy Jim.Vickroy at noaa.gov
Fri Jul 27 09:35:17 MDT 2001


Mike Olson wrote:

>
> To me, unit tests are really development scripts.  They break when you
> get into the final stages of project development and the maintence cycle
> of a project.  Obviously, if the little chunk of code was working, then
> you would not be there fixing bugs which means that the unit test didn't
> test the proper aspects, and the rest of the system has been dependent
> on a piece of code that was not doing what it was supposed to.

So in this case you either modify the unit test to detect the bug, or you write an
additional unit test specifically for that type of bug.

>  So when
> the developer fixes the unit test will break.  If the unit test was what
> defined that chunk of codes contract with the rest of the system, then
> odds are you just broke the rest of the system.
>

In my view, unit test do not define a "code chunk's" contract with a system; they,
instead, verify correctness for a (limited) range of inputs to the code chunk.  Unit
tests say nothing about behavior outside their domain.

>
> Mike
>
> >
> > --
> > Luke Jones = luke/vortex/frii/fullstop/com
> > _______________________________________________
> > This message sent by the FRPythoneers mailing list.
> > Unsubscribe: echo unsubscribe | FRPythoneers-request at lists.community.tummy.com
> > URL: http://lists.community.tummy.com/mailman/listinfo/frpythoneers
>
> --
> Mike Olson                                Principal Consultant
> mike.olson at fourthought.com                +1 303 583 9900 x 102
> Fourthought, Inc.                         http://Fourthought.com
> 4735 East Walnut St,                      http://4Suite.org
> Boulder, CO 80301-2537, USA
> XML strategy, XML tools, knowledge management
> _______________________________________________
> This message sent by the FRPythoneers mailing list.
> Unsubscribe: echo unsubscribe | FRPythoneers-request at lists.community.tummy.com
> URL: http://lists.community.tummy.com/mailman/listinfo/frpythoneers




More information about the FRPythoneers mailing list