[Zope3-dev] Re: [Zope-Checkins] CVS:
Zope3/src/persistent/tests- test_persistent.py:1.5 persistent.txt:1.2
Jeremy Hylton
jeremy at zope.com
Mon Mar 8 12:18:30 EST 2004
> Wouldn't it be better to make the test runner ignore them and then
> actually encourage people to write doc strings if they make unit tests
> easier to read and understand?
If we're going to stick with tests based primarily on the unittest
framework, that makes sense. Of course, people could always write comments,
too. I think the bottom line is that doctest encourages a style that is
rich in commentary and unittest doesn't. With unittest, you spend too much
time writing things like self.assertRaises(....). With doctest, you spend a
lot more time explaining what the code examples are doing.
> Should I commit the following patch?
Sure. That patch helps regardless of how people actually write tests.
Jeremy
More information about the Zope3-dev
mailing list