When producing the output in HTML mode, doctests are simply interpreted as if they were part of markdown syntax and are replaced by (three) blockquotes.
For instance if you have the following code in a test.py file:
def f():
'''
>>> f()
2
'''
return 2
Launching pdoc on that file with pdoc --html test.py will produce a HTML file where the docstring is replaced by the following code:
<blockquote>
<blockquote>
<blockquote>
<p>f()
2</p>
</blockquote>
</blockquote>
</blockquote>
Therefore the >>> are removed and the line return is ignored which makes the doctests hardly readable.
When producing the output in HTML mode, doctests are simply interpreted as if they were part of markdown syntax and are replaced by (three) blockquotes.
For instance if you have the following code in a
test.pyfile:Launching
pdocon that file withpdoc --html test.pywill produce a HTML file where the docstring is replaced by the following code:Therefore the
>>>are removed and the line return is ignored which makes the doctests hardly readable.