repeating doctest runs breaks with stdlib doctest
Bug #628300 reported by
Jim Fulton
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zope.testrunner |
Invalid
|
Undecided
|
Unassigned |
Bug Description
The standard library doctest.
http://
I think we can (and therefore should) work around this by rebuilding the test suites each time we
run the tests.
To post a comment you must log in.
I've used the following monkey-patch in one project to make --repeat work with stdlib's doctest:
import doctest DocTestCase. __init_ _
orig_init( self, *args, **kw)
self._ dt_globs_ copy = self._dt_ test.globs. copy() DocTestCase. tearDown self):
orig_tearDown( self)
self._ dt_test. globs.update( self._dt_ globs_copy) DocTestCase. __init_ _ = fixed_init DocTestCase. tearDown = fixed_tearDown
orig_init = doctest.
def fixed_init(self, *args, **kw):
orig_tearDown = doctest.
def fixed_tearDown(
doctest.
doctest.