feat: run doctest as part of running tests, which collects doctests from both the package’s doc strings and the package documentation by jenstroeger · Pull Request #637 · jenstroeger/python-package-template

So far we’ve had doctest support somewhat configured, but it wasn’t actually used because doctest didn’t run. This PR adds full support for running doctest on both

  • Python package docstrings, and
  • .rst files in the documentation.

Tasks to discuss and (maybe) to add to this PR:

  • Should doctests contribute to the overall code coverage? If so, we’d probably have to combine/append the results of both coverage runs (docs) for a final report; not sure how this is integrated into pytest (docs).
  • We may want to mention doctest support in the README?