[Python-Dev] [Python-checkins] cpython (3.2): #14957: clarify splitlines docs.

R. David Murray rdmurray at bitdance.com
Fri Jun 8 19:08:57 CEST 2012


On Fri, 08 Jun 2012 07:20:55 -0400, Tres Seaver <tseaver at palladion.com> wrote:
> On 06/07/2012 08:55 AM, R. David Murray wrote:
> > On Thu, 07 Jun 2012 11:08:09 +0100, Sam Partington
> > <sam.partington at gmail.com> wrote:
> 
> >> Wouldn't that be better written as a doctest and so avoid any other
> >> typos?
> > 
> > Possibly, except (1) I don't think we currently actually test the
> > doctests in the python docs and
> 
> FWIW, I've had a lot of success lately with automating testing of doctest
> snippets in Sphinx docs via::

Oh, the *mechanics* of running the doctests in the docs are not difficult,
'make doctest' in Doc works just fine (on Python2).

The are four issues: (1) we build the python3 docs using python2, so 'make
doctest' on python3 doesn't currently work, and (2) not all the doctest
snippets are valid doctests, (3) not all the code snippets that can
(and should) be validated are recognized as such by 'make doctest', and
(4) there is no buildbot-style automation for running the doc doctests.

(1) is the easiest one to fix.

--David

PS: A year or so ago I cleaned up the doctests for turtle and
multiprocessing, but I haven't re-run those tests since.  I just did now:
multiprocessing still passes(*), and there is one failing turtle test.

The grand total on 2.7 is 1131 tests, 78 failures.

(*) If I remember correctly "cleaning up the doctests" in Multiprocessing
mostly meant making them not-doctests from 'make doctest's point of
view, and then hand validating them.  But Multiprocessing is a bit of
a special case.


More information about the Python-Dev mailing list