[Zope-Coders] Re: [Zope-Checkins] CVS: Zope3/lib/python/Persistence/BTrees/tests - testBTrees.py:1.1.2.3 testBTreesUnicode.py:1.1.2.4

Guido van Rossum guido@python.org
Sat, 01 Jun 2002 09:32:01 -0400


> Guido van Rossum wrote:
> > 
> > Tests shouldn't have docstrings.

[Chris W]

> Why not?
> 
> unittest.py will print the docstrings in addition to the test name
> if the test fails.
> 
> If find that useful myself....

But unittest prints the docstring *instead* of the test name when it
succeeds.  Sometimes in real life tests don't fail but hang, and then
you have no easy way to find the test.  There's also the consistency
argument: 99% of the Zope doctests don't have docstrings, but (most)
have long meaningful descriptive names instead.

--Guido van Rossum (home page: http://www.python.org/~guido/)