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

Chris Jerdonek report at bugs.python.org
Tue Sep 11 05:42:27 CEST 2012

Chris Jerdonek added the comment:

> Sphinx does have a way to mark doctest snippets as "run this", "don't run this".  I believe that requires using 'make doctest' as the runner,

The doctest module supports this natively (i.e. without the need for Sphinx) via its "skip" directive ("#doctest: +SKIP"):


Sphinx will even hide doctest directives like this when rendering the HTML, so the additional annotation won't be visible to the end user/reader and clutter up the interactive examples (cf. issue 12947).

Also, it looks like the Sphinx "doctest" directive gets most or all of its functionality via the options already exposed by doctest:



Python tracker <report at bugs.python.org>

More information about the docs mailing list