[Zope3-dev] Re: [Zope-Checkins] CVS: Zope3/src/persistent/tests - test_persistent.py:1.5 persistent.txt:1.2

Chris Withers lists at simplistix.co.uk
Tue Mar 9 05:23:51 EST 2004


Jim Fulton wrote:

>> Feed the text of a doctest to python and I'm sure it will complain ;-)
> 
> No, Python handles the example just fine.

Hmm.. can you point me to a good example of a doctest so I can show you what I mean?

>> What's wrong with docstrings in unit tests?
> 
> The docstrings aren't interspuursed with the code.

If they're not, then the code is too long, or you should be adding more python 
comments to your code...

> Bonus, the unittest uses docstrings, if present, in test reports,
> which usually makes it hard to tell what test was being run.

Yeah, that's a logn standign gripe of mine with unittest.py, one which I'm sure 
can easily be corrected by a config option...

> As a
> result, we specifically ask people *not* to write doc strings for
> test methods.

...but that as a solution seems crazy to me...

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk




More information about the Zope3-dev mailing list