[issue2604] doctest.DocTestCase fails when run repeatedly
Piet Delport
report at bugs.python.org
Fri Apr 11 12:29:03 CEST 2008
Piet Delport <pjdelport at gmail.com> added the comment:
Well, whether that code is wrong depends on whether your project policy
wants repeatable tests or not. A repeatable and arguably more idiomatic
way of writing that example is to give DocFileSuite a setUp function
which initializes any special globals required by the test.
In any case, DocTestCase allowing non-repeatable tests (which i don't
think are common) is no reason to disallow repeatable tests, which e.g.
at least Zope considers important enough to motivate fixing this issue.
(Zope is also the source of the code being fixed, if i'm not mistaken.)
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2604>
__________________________________
More information about the Python-bugs-list
mailing list