Skip to content

Create a unit testing framework #241

@fralau

Description

@fralau

It would be useful to have a unit testing framework, in particular for non-regression-testing.

With PR #239, @timvink proposes a pattern already used on mkdocstrings.

For a detailed discussion see #237 about hooks, particularly:

You can test the functions / custom classes separately of course. I actually do prefer small 'integration' testing using mkdocs build.

What's worked for me is to build up a collection of small standalone examples (like here https://github.com/timvink/mkdocs-table-reader-plugin/tree/master/tests/fixtures) and test whether they fail (sometimes they should) or succeed, and whether the resulting html page(s) contain expected output. See f.e. https://github.com/timvink/mkdocs-table-reader-plugin/blob/master/tests/test_build.py

Originally posted by @timvink in #237 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestkeep in mindInteresting idea, keep in mind for the future

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions