pytest-poo is a plugin for pytest that points out your crappy tests with piles of poo.
Really? Why?
I showed the –poo option at EuroPython 2013. A number of people thought I should release it, so here it is.
Screenshots
This is what the output usually looks like:
… when passing –poo, this is what is outputted instead:
Requirements
A recent version of pytest is required (>= 2.3.4).
Quick start
pip install pytest-poo
Mark tests with the pytest.mark.poo marker.
Run tests with the –poo option to enable pile of poo output.
Documentation
Marking tests
Add the pytest.mark.poo marker to the tests that you consider crappy. The markers are standard py.test markers and can be used like this on a test function:
import pytest
@pytest.mark.poo
def test_something():
assert 0
or for classes:
import pytest
class MyTests(object):
pytestmark = [pytest.mark.poo]
… or for entire modules:
import pytest
pytestmark = pytest.mark.poo
def test_a():
assert 0
def test_b():
assert 0
Showing crappy tests during test run
Just run py.test with the --poo option to enable the output. To always enable, add --poo to addopts in pytest.ini:
[pytest]
addopts = --poo
Release files for pytest-poo 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest-poo-1.0.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_poo-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / pytest-poo-1.0.tar.gz
| Download URL | pytest-poo-1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a1d169d4c5466802ab03c14d41f71d5a9fed143f5f36753238c12b6e9a016e4
|
|
BLAKE2b-256 checksum How to use checksums |
c12ae888aadb01d5bab9e917f029e92359ebb34ad974407c89df52085918ae80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9
|
Release files / pytest_poo-1.0-py3-none-any.whl
| Download URL | pytest_poo-1.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03650d0e3a6d8e6cb7c9e86a2cbc353aa204d7b83cbbb346620627aaa1e0885e
|
|
BLAKE2b-256 checksum How to use checksums |
7127b915e332e0a8f6aa15d7b81b48b09dbb82a4ba0785e7585a3d9977a5d6fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9
|