[TIP] unittest2 discovery / doctest integration?

Jim Fulton jim at zope.com
Wed Apr 28 09:04:35 PDT 2010

On Wed, Apr 28, 2010 at 11:27 AM, Pete <pfein at pobox.com> wrote:
> Just wondering how to go about running doctests under unittest2's discovery... The approach mentioned here http://docs.python.org/dev/library/doctest.html#unittest-api gets the doctests run, but is kinda bogus (you get 2 sets of test runner output).  Glancing at unittest2's discovery stuff, it seems to look for TestCases, but not TestSuites. Just wondering if there's something obvious I'm missing, or if I should start poking through/ripping off doctest's implementation of integration (which is lightly documented).

I wrote the original doctest integration.  At the time, integration as
suites seemed like a good idea.  It turns out that many discovery
strategies now look for test case instances.  If I could do over, I
would do it differently. That, of course, is moot. :)

I wonder if the discovery tools could look for some marker, provided
by both test cases and doctest suites.


Jim Fulton

More information about the testing-in-python mailing list