Author terry.reedy
Recipients docs@python, eric.araujo, ezio.melotti, georg.brandl, terry.reedy
Date 2012-05-20.17:58:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1337536694.63.0.542931738001.issue14865@psf.upfronthosting.co.za>
In-reply-to
Content
In the doctest section, 25.2.3.5. Option Flags and Directives has examples of using #doctest: directives in the .rst source
'''
An example's doctest directives modify doctest's behavior for that single example.  Use ``+`` to enable the named behavior, or ``-`` to disable it.

For example, this test passes::

   >>> print(list(range(20))) #doctest: +NORMALIZE_WHITESPACE
   [0,   1,  2,  3,  4,  5,  6,  7,  8,  9,
   10,  11, 12, 13, 14, 15, 16, 17, 18, 19]
'''
However, when converted to html or Window's help, the directive is removed. See for example

http://docs.python.org/py3k/library/doctest.html#option-flags-and-directives

This was reported on python-list for 2.7 and 3.? (.2 probably) by Steven D'Aprano and verified by me for 3.3.0 Win help. Vincent Vande Vyvre provided quote from 3.? .rst source and I verified it and several more following in 3.3.0.

I presume the problem is that we now use the same directives to help doctest source examples for other modules and sphinx with our customizations does not know to leave these particular directives in the text after using them.

I searched issues for '#doctest' and did not see anything about removal.
History
Date User Action Args
2012-05-20 17:58:14terry.reedysetrecipients: + terry.reedy, georg.brandl, ezio.melotti, eric.araujo, docs@python
2012-05-20 17:58:14terry.reedysetmessageid: <1337536694.63.0.542931738001.issue14865@psf.upfronthosting.co.za>
2012-05-20 17:58:13terry.reedylinkissue14865 messages
2012-05-20 17:58:13terry.reedycreate