[Python-Dev] doc tests failing
Georg Brandl
g.brandl at gmx.net
Fri Nov 13 10:40:16 EST 2015
On 11/13/2015 04:12 PM, Ethan Furman wrote:
> What am I doing wrong?
Running "make doctest" in the first place. The doctests in the core docs
were not written to support that, and also never updated to do so.
Georg
> 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:
> remote_command
> 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 <module>
> remote_command
> NameError: name 'remote_command' is not defined
>
> **********************************************************************
> File "howto/sorting.rst", line ?, in default
> Failed example:
> sorted([5, 2, 4, 1, 3], cmp=numeric_compare)
> 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 <module>
> sorted([5, 2, 4, 1, 3], cmp=numeric_compare)
> NameError: name 'numeric_compare' is not defined
>
> **********************************************************************
> File "library/ipaddress.rst", line ?, in default
> Failed example:
> n2 = ip_network('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 <module>
> n2 = ip_network('192.0.2.1/32')
> NameError: name 'ip_network' is not defined
>
> --
> ~Ethan~
>
More information about the Python-Dev
mailing list