Use Doctests Directly either in Sphinx or with Pytest
- Lingua principale
- Python
- Stelle
- 288
- Fork
- 138
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## Problem
We've recently started testing some of our RST doc snippets in the file `tests/integration/user_guide_test.py`. Though testing is much preferred over no testing the main problem is that there is no guarantee that the code being tested is in sync with the documentation being generated. Additionally, overall coverage for these doc-snippets is quite low.
## Solution
Sphinx and python already have a [well known strategy for this](https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html). In particular `cd docs && make doctest` ought to be made to work and then evaluate all of our snippets, giving us confidence that or documentation is correct.
## Dependencies
None
## Urgency
Medium - we want to have greater confidence that our documentation is correct
## Links
* [Python doctests](https://docs.python.org/3/library/doctest.html)
* [Sphinx doctests](https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html)
* [Pytest doctests](https://docs.pytest.org/en/6.2.x/doctest.html)
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.