Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: run doctest as part of running tests, which collects doctests from both the package’s doc strings and the package documentation #637

Merged
merged 8 commits into from
Jan 20, 2024

Conversation

jenstroeger
Copy link
Owner

@jenstroeger jenstroeger commented Nov 12, 2023

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?

@behnazh
Copy link
Collaborator

behnazh commented Jan 6, 2024

  • 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).

Yes, that would be a good idea but not sure how to do it neither 🤔

We may want to mention doctest support in the README?

Sure!

@jenstroeger jenstroeger merged commit 24afc09 into staging Jan 20, 2024
10 checks passed
@jenstroeger jenstroeger deleted the add-doctest-support branch September 4, 2024 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants