Skip to main content

Visualize your crappy tests

Project description

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.


This is what the output usually looks like:

Normal mode, without poo

… when passing –poo, this is what is outputted instead:

Poo mode!


A recent version of pytest is required (>= 2.3.4).

Quick start

  1. pip install pytest-poo
  2. Mark tests with the pytest.mark.poo marker.
  3. Run tests with the –poo option to enable pile of poo output.


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

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:

addopts = --poo

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pytest-poo, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size pytest_poo-1.0-py3-none-any.whl (3.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pytest-poo-1.0.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page