Other Resources¶
Click CLI Testing¶
The Click CLI framework provides a dedicated CliRunner object for testing.
Project Examples¶
These are a few projects who use https://pypi.org/project/cli-test-helpers. Take a look at their tests, how they use mocks, how they structure their code to make writing tests easy!
Add yours via a pull request, so others can learn from you!
GitLab CI Setup and Badges¶
If you use GitLab you can set up badges with the following generic configuration.
Coverage:
Link:
https://gitlab.com/%{project_path}/-/graphs/%{default_branch}/charts
Badge image URL:
https://gitlab.com/%{project_path}/badges/%{default_branch}/coverage.svg
Pipeline:
Link:
https://gitlab.com/%{project_path}/-/pipelines
Badge image URL:
https://gitlab.com/%{project_path}/badges/%{default_branch}/pipeline.svg
Releases:
Link:
https://gitlab.com/%{project_path}/-/releases
Badge image URL:
https://gitlab.com/%{project_path}/-/badges/release.svg
Package releases will be triggered by pushing a Git tag to your Git repository.