pytest-doctestplus icon indicating copy to clipboard operation
pytest-doctestplus copied to clipboard

Does pytest-doctestplus support testcode and testoutput directives?

Open artsiomkaltovich opened this issue 4 years ago • 10 comments

Hello.

I've just install pytest-doctestplus, so sorry, for probably stupid question.

I am written the following doc:

>>> 43 + 1
44

.. testcode::
    43 + 1

The result is:

.. testoutput::
    44

But when I run pytest only first test is executed.

While is is also correct way for defining tests: https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html

Regards.

artsiomkaltovich avatar Apr 23 '20 15:04 artsiomkaltovich