From 4fc20c8d28b637974afa237a89e8956252a794a2 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 4 Dec 2020 15:24:56 -0300 Subject: List pytest-doctestplus in doctest docs As per https://github.com/pytest-dev/pytest/discussions/8088 --- doc/en/doctest.rst | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'doc') 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 `__. - 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 `__: provides + advanced doctest support and enables the testing of reStructuredText (".rst") files. + +* `Sybil `__: 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. -- cgit v1.2.3