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
File details
Details for the file pytest-local-badge-1.0.3.tar.gz
.
File metadata
- Download URL: pytest-local-badge-1.0.3.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e13274cc9cadf91a1e3fa290d0bbbd371a365f9d719411e475596f722c2725a5 |
|
MD5 | 9bcb88d23b24fdd2e9bfe1a890e3747c |
|
BLAKE2b-256 | f895e908d1d6c127bd4092bcc3b49db811fb1290255de7b89a625ce588a1d3af |
File details
Details for the file pytest_local_badge-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: pytest_local_badge-1.0.3-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e14dc79922598e5b27ef4398a3537535ad115df2229ebba0259f6c6d92c6047b |
|
MD5 | 9ffdd56b5e18be79d93e6bd458bc1a9f |
|
BLAKE2b-256 | d56a0c25c485289a7667f187345bab6eda6ec8998fb5bb828a02e4f6cec38ea5 |