[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"):

http://docs.python.org/dev/library/doctest.html#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:

http://sphinx.pocoo.org/ext/doctest.html?#directive-doctest

----------

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


More information about the docs mailing list