Pytest plugin Mark test as a bug
Project description
pytest-bug
Install
pip install pytest-bug
Example
import pytest
@pytest.mark.bug('skip')
def test_one():
assert False
@pytest.mark.bug('fail', run=True)
def test_two():
assert False
@pytest.mark.bug('pass', run=True)
def test_three():
assert True
@pytest.mark.bug('skip class')
class TestFour:
def test_one(self):
assert False
def test_two(self):
assert True
@pytest.mark.bug('class', run=True)
class TestFive:
def test_one(self):
assert False
def test_two(self):
assert True
$ pytest
======================== test session starts ========================
platform linux -- Python 3.x.y, pytest-x.y.z, py-x.y.z, pluggy-x.y.z
cachedir: $PYTHON_PREFIX/.pytest_cache
rootdir: $REGENDOC_TMPDIR
plugins: bug-x.y.z
collected 7 items
test_sample.py bfpbbfp
---------- Bugs skipped: 3 Bugs passed: 2 Bugs failed: 2 ----------
=================== 2 passed, 5 skipped in 0.10s ===================
Symbols:
b
- bug skipf
- bug failp
- bug pass
verbosity
$ pytest -v
======================== test session starts ========================
platform linux -- Python 3.x.y, pytest-x.y.z, py-x.y.z, pluggy-x.y.z
cachedir: $PYTHON_PREFIX/.pytest_cache
rootdir: $REGENDOC_TMPDIR
plugins: bug-x.y.z
collected 7 items
test_sample.py::test_one BUG-SKIP [ 14%]
test_sample.py::test_two BUG-FAIL [ 28%]
test_sample.py::test_three BUG-PASS [ 42%]
test_sample.py::TestFour::test_one BUG-SKIP [ 57%]
test_sample.py::TestFour::test_two BUG-SKIP [ 71%]
test_sample.py::TestFive::test_one BUG-FAIL [ 85%]
test_sample.py::TestFive::test_two BUG-PASS [100%]
---------- Bugs skipped: 3 Bugs passed: 2 Bugs failed: 2 ----------
=================== 2 passed, 5 skipped in 0.10s ===================
Command line options:
option | description |
---|---|
--bug-no-stats | Disabling summary statistics |
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file pytest_bug-0.5.6-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_bug-0.5.6-py2.py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1546553a343ca7f743d3c1d3614cebe8568bca490005ad0c4afb28f6ffa71724 |
|
MD5 | 1211b0a322f341d7d0b885c8e6bb99a8 |
|
BLAKE2b-256 | 1d8d2fa244e5417e9d3d3a8aa12a3179060273373d66a1467bd8777537390100 |