Skip to content

Doctests with Pytest #82

Description

@alecandido

Pytest supports doctests.
https://docs.pytest.org/en/stable/how-to/doctest.html#doctest

Thus, there is no reason to keep a separate step for executing doctests, relying on a different infrastructure (Sphinx itself) and even requiring an additional system dependency (Pandoc).

- name: Test documentation examples
shell: bash
if: inputs.doctests != 'false'
run: |
sudo apt install pandoc
eval $(poetry env activate)
poe test-docs || make -C doc doctest # TODO: both commands are kept, to
# preserve backwards compatibility,
# remove in next breaking change

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions