[docs] [issue10225] Fix doctest runable examples in python manual
Alexander Belopolsky
report at bugs.python.org
Wed Jan 12 16:33:42 CET 2011
Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
I have updated Sphinx and rerun py3k doctests. It looks like the newest Sphinx does not check examples unless the file has a .. testsetup:: directive somewhere. This is nice because it focuses on the files that are clearly intended to be doctest-checked. Of course, there are many perfectly good code examples that are now skipped, but this can be addressed in the next step.
I am attaching a patch that makes the following command succeed in py3k Doc directory:
$ sphinx-build --version
Sphinx v1.1pre
..
$ sphinx-build -b doctest -d build/doctrees . build/doctest
..
Doctest summary
===============
581 tests
0 failures ..
Most of the changes in issue10225-py3k.diff are non-controvercial with the exception of code fixes in collections and difflib.
In collections, I removed trailing whitespace from generated namedtuple code and in difflib I changed get_close_matches() return value from map object to a list. I would appreciate comments on these two changes.
----------
Added file: http://bugs.python.org/file20375/issue10225-py3k.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10225>
_______________________________________
More information about the docs
mailing list