[docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests

Chris Jerdonek report at bugs.python.org
Tue Sep 11 03:19:54 CEST 2012


Chris Jerdonek added the comment:

> Integrating this with regrtest requires some work, for example you would have to count successes/failures, add skips for certain tests and resources to control what tests should be run (there's currently a turtle going around on my screen when I run `make doctest`).

Fortunately, we get a lot of this for free when integrating with regrtest because the infrastructure is already there for the other tests.  For example, the test counts for my previous comment were automatic, operating in a clean temp cwd is something else taken care of, a command-line interface is already present, etc.

The main doctest-specific things that needed to be added were (1) doctest discovery (which involves walking the Lib/ and Doc/ directory hierarchies), and (2) creating TestSuite instances differently (by invoking DocTestSuite and DocFileSuite as opposed to calling TestLoader.loadTestsFromModule()).

I would still like to decouple the code a bit more and perhaps even add some unit tests for some of the newly added code.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15629>
_______________________________________


More information about the docs mailing list