This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author boogenhagn
Recipients boogenhagn, fdrake
Date 2010-07-21.22:08:34
SpamBayes Score 0.0062647443
Marked as misclassified No
Message-id <1279750116.68.0.946227736764.issue9327@psf.upfronthosting.co.za>
In-reply-to
Content
doctest.DocFileTest inserts the test's path into the globs as "__file__",
but doctest.DocTestCase's tearDown method simply calls globs.clear(),
so that subsequent runs of the test case will not receive the same
initial globals.

This means that doctests referencing __file__ cannot be run repeatedly
without using a custom setUp that restores __file__.

I think most would expect symmetry between setUp and tearDown, and in
fact zope.testrunner operates with this false assumption when run
with the "-N" option to repeat a test N times.
History
Date User Action Args
2010-07-21 22:08:36boogenhagnsetrecipients: + boogenhagn, fdrake
2010-07-21 22:08:36boogenhagnsetmessageid: <1279750116.68.0.946227736764.issue9327@psf.upfronthosting.co.za>
2010-07-21 22:08:34boogenhagnlinkissue9327 messages
2010-07-21 22:08:34boogenhagncreate