Skip to content

sfauvel/doc_as_test_pytest

Repository files navigation

Doc as test with pytest

This project provides tools to implements Doc as test with Python and pytest.

Prerequisite

With docker

The script docker/build_docker_image.sh build the image that run tests.

To run them, use the run_pytest.sh script giving him parameters to pass to pytest command.

Example:

. run_pytest.sh -v

Without docker

To execute examples in this project you need to install Python and the libraries listed in python_libs.txt.

They can install them with pip install command.

Versions are just those used in our environment but it should work with others.

To run the tests, use the following command:

pytest -v

Usage

The file doc_as_test_pytest.py encapsulate Approvals to call verify at the end of each test and to generate a document containing all test documents of the same file.

There is a test example with the file test_demo_with_approvals.py. Approved documents are on the docs folder.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published