A sad state of doctests in the python manual
I have just discovered that sphinx supports running doctests embedded in ReST documentation. It looks like it is as simple as "cd Doc; make doctest". The result, however is not encouraging: $ make doctest ... Doctest summary =============== 1162 tests 262 failures in tests 0 failures in setup code ...
On the second look, the problem may not be that bad - "make doctest"
picks up system python instead of the one from the source tree. I'll
try to figure out how to rerun the doctests properly.
On Thu, Oct 28, 2010 at 4:48 PM, Alexander Belopolsky
I have just discovered that sphinx supports running doctests embedded in ReST documentation. It looks like it is as simple as "cd Doc; make doctest". The result, however is not encouraging:
$ make doctest ... Doctest summary =============== 1162 tests 262 failures in tests 0 failures in setup code ...
On Thu, Oct 28, 2010 at 4:52 PM, Alexander Belopolsky
On the second look, the problem may not be that bad ...
Nope, the problem is even worse. It looks like Sphinx in py3k requires 2.x python: $ ../python.exe tools/sphinx-build.py -b doctest -d build/doctrees -D latex_paper_size= . build/doctest Traceback (most recent call last): File "tools/sphinx-build.py", line 27, in <module> from sphinx import main File "tools/sphinx/__init__.py", line 44 except ImportError, err: ^ SyntaxError: invalid syntax
On Oct 28, 2010, at 04:57 PM, Alexander Belopolsky wrote:
On Thu, Oct 28, 2010 at 4:52 PM, Alexander Belopolsky
wrote: On the second look, the problem may not be that bad ...
Nope, the problem is even worse. It looks like Sphinx in py3k requires 2.x python:
$ ../python.exe tools/sphinx-build.py -b doctest -d build/doctrees -D latex_paper_size= . build/doctest Traceback (most recent call last): File "tools/sphinx-build.py", line 27, in <module> from sphinx import main File "tools/sphinx/__init__.py", line 44 except ImportError, err: ^ SyntaxError: invalid syntax
It would be really cool if you fixed this! <wink> -Barry
On Thu, Oct 28, 2010 at 5:30 PM, Alexander Belopolsky
On Thu, Oct 28, 2010 at 5:18 PM, Barry Warsaw
wrote: .. It would be really cool if you fixed this! <wink>
Working on it. Stay tuned. :-)
participants (2)
-
Alexander Belopolsky
-
Barry Warsaw