[Python-Dev] doc tests failing (original) (raw)

R. David Murray rdmurray at bitdance.com
Fri Nov 13 10:44:26 EST 2015


We don't have clean doctests for the docs. Patches welcome.

At one point I had made the turtle doctests pass (it draws a bunch of stuff on the screen) because otherwise we don't have very many turtle tests, but I haven't checked it in a couple years.

Hmm. We could list making the doc doctests pass as an activity for beginners in the devguide.

On Fri, 13 Nov 2015 07:12:32 -0800, Ethan Furman <ethan at stoneleaf.us> wrote:

What am I doing wrong?

I have tried: -------------------------------------------------------- hg update 3.5 # and hg update default make distclean && ./configure --with-pydebug && make -j2 cd Doc make doctest -------------------------------------------------------- and in both cases I get page after page of errors. I have tried installing python-sphinx and python3-sphinx; I have tried adding PYTHON=../python and PYTHON=python3 to the make doctest line -- all to no avail. Here's a random sample of the errors: ********************************************************************** File "library/shlex.rst", line ?, in default Failed example: remotecommand Exception raised: Traceback (most recent call last): _File "/usr/lib/python2.7/doctest.py", line 1315, in run compileflags, 1) in test.globs File "<doctest default[1]>", line 1, in remotecommand NameError: name 'remotecommand' is not defined ********************************************************************** File "howto/sorting.rst", line ?, in default Failed example: sorted([5, 2, 4, 1, 3], cmp=numericcompare) Exception raised: Traceback (most recent call last): _File "/usr/lib/python2.7/doctest.py", line 1315, in run compileflags, 1) in test.globs File "<doctest default[1]>", line 1, in sorted([5, 2, 4, 1, 3], cmp=numericcompare) NameError: name 'numericcompare' is not defined ********************************************************************** File "library/ipaddress.rst", line ?, in default Failed example: n2 = ipnetwork('192.0.2.1/32') Exception raised: Traceback (most recent call last): _File "/usr/lib/python2.7/doctest.py", line 1315, in run compileflags, 1) in test.globs File "<doctest default[1]>", line 1, in n2 = ipnetwork('192.0.2.1/32') NameError: name 'ipnetwork' is not defined -- Ethan


Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/rdmurray%40bitdance.com



More information about the Python-Dev mailing list