diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2020-12-05 17:42:09 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-05 17:42:09 -0300 |
commit | 68a0f22eee1e10af2532b4c6efeedfb04aa9ef55 (patch) | |
tree | 414ad57610f327a1818252f88d3fa74ff1ad881a /doc | |
parent | 1a1bb6134093b66541bafce28ed74a9c7559ba78 (diff) | |
parent | 4fc20c8d28b637974afa237a89e8956252a794a2 (diff) | |
download | pytest-68a0f22eee1e10af2532b4c6efeedfb04aa9ef55.tar.gz |
Merge pull request #8100 from nicoddemus/doctest-alternatives
List pytest-doctestplus in doctest docs
Diffstat (limited to 'doc')
-rw-r--r-- | doc/en/doctest.rst | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/doc/en/doctest.rst b/doc/en/doctest.rst index f486d5a9b..f8d010679 100644 --- a/doc/en/doctest.rst +++ b/doc/en/doctest.rst @@ -77,15 +77,6 @@ putting them into a pytest.ini file like this: [pytest] addopts = --doctest-modules -.. note:: - - The builtin pytest doctest supports only ``doctest`` blocks, but if you are looking - for more advanced checking over *all* your documentation, - including doctests, ``.. codeblock:: python`` Sphinx directive support, - and any other examples your documentation may include, you may wish to - consider `Sybil <https://sybil.readthedocs.io/en/latest/index.html>`__. - It provides pytest integration out of the box. - Encoding -------- @@ -303,3 +294,18 @@ docstring. * Text files: the functions will skip/xfail the checks for the rest of the entire file. + + +Alternatives +------------ + +While the built-in pytest support provides a good set of functionalities for using +doctests, if you use them extensively you might be interested in those external packages +which add many more features, and include pytest integration: + +* `pytest-doctestplus <https://github.com/astropy/pytest-doctestplus>`__: provides + advanced doctest support and enables the testing of reStructuredText (".rst") files. + +* `Sybil <https://sybil.readthedocs.io>`__: provides a way to test examples in + your documentation by parsing them from the documentation source and evaluating + the parsed examples as part of your normal test run. |