Skip to main content

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:

MIT License

Metadata

Release files for pytest-percent 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-percent 0.1.2
File Size Uploaded
pytest-percent-0.1.2.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-percent 0.1.2
File Interpreter ABI Platform
pytest_percent-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / pytest-percent-0.1.2.tar.gz

Download URL pytest-percent-0.1.2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8e488e4bf2c0c2d3badba6b530eb18d3ef264710e44b150030a5fa1cafb74f60
BLAKE2b-256 checksum
How to use checksums
ca3989d2b01f403db4480cabec636ea7cb4a3e5de3827e7a9bd8f268960cee81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

Release files / pytest_percent-0.1.2-py3-none-any.whl

Download URL pytest_percent-0.1.2-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d453ea5e505cee7510c316266d31b059ce00b6539969302b8376d32ad844404c
BLAKE2b-256 checksum
How to use checksums
03de23964d4ed415f9ea2b495265cb2e51a0ac3bf9ab91f61fee28d669de1b41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

1 release file

0.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page