nh3 icon indicating copy to clipboard operation
nh3 copied to clipboard

Improve doctests handling

Open HelgeKrueger opened this issue 1 year ago • 1 comments

Note: I don't expect this to be easily doable in this project. It would either belong into pytest or maturin. This is just where this issue arose for me.

This issue arose while implementing https://github.com/messense/nh3/pull/72

By adding

[tool.pytest.ini_options]
addopts = '--doctest-glob="*.rst"'

to pyproject.toml, one can run the docstrings in docs/index.rst using pytest. See here.

Unfortunately, this doesn't run the doctests in src/lib.rs.

Question: Can one adopt the tooling to also run these?

HelgeKrueger avatar Dec 22 '24 09:12 HelgeKrueger

Maybe we can run doctests using https://github.com/twmr/pytest-sphinx?

messense avatar Dec 22 '24 09:12 messense