[Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

Benji York benji at zope.com
Mon Mar 10 13:32:15 EDT 2008


Wichert Akkerman wrote:
> The fact that something is popular does not necessarily mean it is the
> right thing :)

Very true.  It does, however, mean that you have to have a convincing 
argument to change popular opinion.

> Lack of isolation is a very convincing argument to me.

This almost never bites me (if I'm understanding you correctly).

> Perhaps more personal taste but I also find python unittests to be much
> more readable. You don't suffer from mixing lots of test setup/teardown
> being repeated through the file. As Tres mentioned this is especially
> true when testing corner cases.

Footnotes and good test structure alleviate the need for in-line 
setup/teardown.

> Being able to debug tests by stepping over them with pdb is incredibly
> useful. With doctests that doesn't work.

As a heavy pdb user, this rarely bothers me, but seems to be more of an 
implementation issue than an argument that doctests are bad for unit tests.

> Being able to run a single test easily allows for quick testing and
> debugging. I can't tell the testrunner 'start running at line 52 but
> also include all the test setup magic from before, but skip the rest'. With
> unittests I can simple run zopectl test -s <module> -t <test function>.

I don't see a huge advantage over

     bin/test -s <package> -t <doctest file name>

> doctests hurt my productivity badly.

<shrug> I guess I'm the odd-man-out.
-- 
Benji York
Senior Software Engineer
Zope Corporation


More information about the Zope-Dev mailing list