There are a few directives in http://www.sphinx-doc.org/en/stable/ext/doctest.html that are not supported by the pytest doctest framework. Especially the testcode and testoutput directive are nice to have, even in docstrings in *.py files. Sphinx AFAIU supports these directives in their doctest runner (sphinx-build -b doctest). It would be nice if pytest supports these directives natively.
Hi @thisch thanks for writing.
This has been brought before in #758, and because of the requirement on Sphinx, I still think this should be made into an external plugin (pytest-sphinx sounds nice). 馃榿
as this is not actionable for pytest i propose closing
I agree, left it open to see what others think.
Closing now, but @thisch feel free to follow up with any questions.
Thx for the prompt feedback. I have to say that I expected my feature request to be rejected, but hope dies last ;) I'll have a look whether this can be implemented easily in an external plugin. Where should I ask in case of questions? In this issue or in IRC? You don't have a gitter.im channel yet, right?
Feel free to ask here (usually answers take longer) or on IRC (which I think has more people that can help). 馃憤
You are right, we don't have a gitter channel.
FYI, finally the pytest-sphinx plugin (https://github.com/thisch/pytest-sphinx) is working. It supports only the testcode and testoutput directives ATM, though. Once I'm satisfied with the implementation and if there is interest, we can move this repo to pytest-dev.
Great to hear! Maybe @alanjds will be interested to know, since he also was interested in pytest+sphinx functionality.
Awesome @thisch! It would be great to have this plugin in pytest-dev. For reference, here are the guidelines for it, which I believe you already satisfies most (if not all) of them. 馃憤
I added the changelog file a few days ago. Even if all requirements for submission to pytest-dev are fulfilled now, I'll test/improve it a few weeks/months and will then submit it to pytest-dev.
Most helpful comment
FYI, finally the pytest-sphinx plugin (https://github.com/thisch/pytest-sphinx) is working. It supports only the testcode and testoutput directives ATM, though. Once I'm satisfied with the implementation and if there is interest, we can move this repo to pytest-dev.