Open twmr opened 4 years ago
This is already supported by pytest, see https://docs.pytest.org/en/latest/doctest.html#doctest-namespace-fixture
I created a ticket, where I asked about implementation details of this feature in https://github.com/pytest-dev/pytest/issues/7140
The doctest plugin in sphinx support specifying a code block in
conf.py
that is called at setup timeSupport for specifying this code block somewhere should be added.
It can't be added to pytest.ini, because AFAIK it (or ini files in general) doesn't have support for multiline values. So probably it needs to be set in conftest.py. If anyone know how this can be done - please comment.