Skip to main content

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:

Normal mode, without poo

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

Poo mode!

Requirements

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.

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)

Source distribution for pytest-poo 1.0
File Size Uploaded
pytest-poo-1.0.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-poo 1.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

0.2

1 release file

0.1

1 release file

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