A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-September/121721.html below:

[Python-Dev] unsupported doctest directives in Doc/library/ctypes.rst

[Python-Dev] unsupported doctest directives in Doc/library/ctypes.rst [Python-Dev] unsupported doctest directives in Doc/library/ctypes.rstChris Jerdonek chris.jerdonek at gmail.com
Thu Sep 13 15:25:52 CEST 2012
In the process of studying the global state of our doctests, I noticed
that the doctests in Doc/library/ctypes.rst use the following doctest
directives:

# doctest: +LINUX
# doctest: +WINDOWS

However, I'm not able to find evidence that these directives are
implemented anywhere.  Thus I get an error like the following when
trying to parse the file using doctest:

"ValueError: line 55 of the doctest for ctypes.rst has an invalid
option: '+WINDOWS'"

The reST file says this towards the top:

"Note: The code samples in this tutorial use :mod:`doctest` to make sure that
they actually work.  Since some code samples behave differently under Linux,
Windows, or Mac OS X, they contain doctest directives in comments.""

The farthest back I was able to trace this paragraph was here from April 2006:

http://hg.python.org/cpython/rev/0e0e315b4202

in which the docs seem to have been added from reST sources outside
the repository (from ctypes 0.9.9.6 upstream -- see the parent
changeset).

I would like for our docs to be parseable by doctest without error.
Possible options seem to include at least (1) changing these
directives to normal code comments until we can support these
directives in a meaningful way, and (2) calling
doctest.register_optionflag() for these directives as no-ops as
appropriate to make the errors go away.

Does anyone have any thoughts on this?

Thanks,
--Chris
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4