--On 11. März 2008 09:42:11 -0300 David Pratt <[EMAIL PROTECTED]> wrote:

Hi Andreas. I think your response gets to the heart of the issue. For
software to be useful, it is often more important for folks other than
the author to understand it. This can only occur with communication.
Sometimes it is the understanding of edgecases in particular, that gets
lost over time. I find generally that I cannot keep in memory all of the
details of the code I write. Several months afterwards without my own
documentation, these details can be lost. So it is just important if I
need to come back to it myself as for anyone else.

You can also document your edgecase in the same way as comments within your
unittests. It matters that you have tests for the related edgecases. It's up to every developer to decide which test type is best for the individual case. If you're good in story telling (I am not so good), go with doctest but there can not be law that everything must be in doctests.

If the test is worth writing, it is not difficult to add a small amount
of text to communicate about it. If the software is worth writing in the
first place, I consider the code incomplete without doctests. For
community projects, it is often the case that it is not the author
maintaining the code in the future. This only strengthens the argument
for doctests and the reason this has become the standard for zope.

Agreed. But unittests are for certain tests more suitable. E.g. if you need a complex and bigger fixture or something like that.


Attachment: pgpD0OJ80QkUV.pgp
Description: PGP signature

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to