Change the exit code of pytest test sessions when a required percent of tests pass.
Project description
Requirements:
Installation:
pip install pytest-percent
About:
This plugin will change the exit code of pytest test sessions when a required percent of tests pass.
Usage:
pytest --required-percent=80
=============================================================================================================================================== test session starts ===============================================================================================================================================
platform win32 -- Python 3.8.0, pytest-5.3.1, py-1.8.0, pluggy-0.13.0
rootdir: D:\Documents\pytest.percent, inifile: pytest.ini
plugins: metadata-1.8.0, percent-0.0.2
collected 5 items
tests/test_percent.py::test_one PASSED [ 20%]
tests/test_percent.py::test_two PASSED [ 40%]
tests/test_percent.py::test_three PASSED [ 60%]
tests/test_percent.py::test_four PASSED [ 80%]
tests/test_percent.py::test_five FAILED [100%]
--------------------------------------------------------------------------------------------------------------------------------------------- live log sessionfinish ----------------------------------------------------------------------------------------------------------------------------------------------
INFO pytest_percent:pytest_percent.py:35 80% of tests passed, required 80%.
================================== FAILURES ===================================
__________________________________ test_five __________________________________
def test_five():
> assert False
E assert False
tests\test_percent.py:18: AssertionError
========================= 1 failed, 4 passed in 0.10s =========================
D:\Documents\pytest.percent>echo %errorLevel%
0
Issues
If you encounter any problems, please file an issue along with a detailed description.
License:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytest-percent-0.0.3.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file pytest-percent-0.0.3.tar.gz
.
File metadata
- Download URL: pytest-percent-0.0.3.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09b8321a2b763fccf1299faeebdef043133a5cdb36d19069ed9971ecf202861d |
|
MD5 | dbdec3884ae3bbce1612ccbb42b732a1 |
|
BLAKE2b-256 | 95abc841fbdf0669f6b9583c70d4f0977d2cbe8d828837953e7d6136ae291b4f |
File details
Details for the file pytest_percent-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: pytest_percent-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfd5612dcd27bf49f868e092898fe6cb1615cfefe8645bebc1b2cbf6f06f677c |
|
MD5 | 7369f9fd043d9008269b95570b40db68 |
|
BLAKE2b-256 | 8478e45618281c6f2cb7f7f7ed2d7daff42eba6025529e803f81b62376b15dcc |