Generate local badges (shields) reporting your test suite status.
Project description
Pytest local badge
Pytest extension to generate SVG badge files with pytest stats (number of tests passed, pytest-cov
coverage statistics.)
Motivation
Everyone likes pretty code status badges. However, hosting them can get bit troublesome when working on private projects.
This pytest plugin sidesteps the problem by generating local badge files that you can simply add to the project repository and reference in the README.md
directly.
Having a bit of extra noise in your change history is worthy cost of having pretty badges, right?
Installation
pip install pytest-local-badge
Usage
The only thing you have to tell the plugin is where to store badges:
pytest --local-badge-output-dir badges/
All supported badges will be stored that directory. You can find the complete list of supported options by calling pytest -h
and looking for all configuration parameters starting with --local-badge-*
.
Here are the options available at the moment:
--no-local-badge Disable the local badge plugin.
--local-badge-output-dir=LOCAL_BADGE_OUTPUT_DIR
The directory to save local badges to.
--local-badge-generate={cov,status} [{cov,status} ...]
List of local badges to generate.
--local-badge-status-file-name=LOCAL_BADGE_STATUS_FILE_NAME
Desired output file name
--local-badge-cov-file-name=LOCAL_BADGE_COV_FILE_NAME
Desired output file name
Supported badges:
status
-- Number of tests (total & passed)cov
-- Coverage report as perpytest-cov
plugin (thepytest-cov
must be installed separately.)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest_local_badge-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7032f7febc178b2a0a03302f6140a54512ce047ba6ea9594c19746b3d52885d |
|
MD5 | a3a9976513ff2f68833dea7cad5c5f42 |
|
BLAKE2b-256 | 629620fff263653639643fe9e7dff2081782738d72df9695556f3cce0fcd5912 |