bpo-36675: Doc: Reveal doctest directives #23620
Conversation
|
Backport won't be possible, we have older sphinx on older branches. |
|
@andresdelfino I see you a lot on the doc those time, though you would be interested in proofreading this :) |
|
@JulienPalard Sure! |
c8a10d2
into
python:master
|
@JulienPalard could you check the comment I made? I believe something is missing. |
|
@andresdelfino Gladly, but, which comment? |
| Another bad idea is to print things that embed an object address, like :: | ||
| Another bad idea is to print things that embed an object address, like | ||
|
|
||
| .. doctest:: | ||
|
|
andresdelfino
Dec 16, 2020
Contributor
Perhaps
| :no-trim-doctest-flags: |
is missing here?
andresdelfino
Dec 16, 2020
Contributor
The rendered docs doesn't show the doctest directive in this case.
JulienPalard
Dec 17, 2020
Author
Member
I think it's better to keep it hidden in this case. The case is:
>>> id(1.0) # certain to fail some of the time
7948648
>>> class C: pass
>>> C() # the default repr() for instances embeds an address
<C object at 0x00AC18F0>
the comment in the case is true: it's expected to fail. If we reveal the hidden doctest: +SKIP it's no longer expected to fail, the comment becomes erroneous.
The point of this example is to demo usefull cases for +ELLIPSIS, not +SKIP.
|
@JulienPalard sorry, I thought it was submitted, but I was seeing a draft. |
Doctest directive were hidden in HTML and PDF output, this PR show them back.
https://bugs.python.org/issue36675