[TIP] Best way to do setup/teardown on a per-test basis using doctest?
Benji York
benji at benjiyork.com
Mon Jul 2 05:54:34 PDT 2007
Titus Brown wrote:
> You might be right. I wonder if the zope doctest guarantees that the
> teardown is called?
I don't know if it's an addition we made, or if it's part of the
mainline doctest, but the setUp and tearDown arguments to
zope.testing.doctest.DocFileSuite seem applicable.
Here's an example of them in use:
http://svn.zope.org/*checkout*/zc.vault/trunk/src/zc/vault/tests.py?content-type=text%2Fplain&rev=69750
--
Benji York
http://benjiyork.com
More information about the testing-in-python
mailing list