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.

Example output

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

Project details


Download files

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

Source Distribution

pytest-poo-0.1.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file pytest-poo-0.1.tar.gz.

File metadata

  • Download URL: pytest-poo-0.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pytest-poo-0.1.tar.gz
Algorithm Hash digest
SHA256 28f956ef593a60b66c1bd7df23795a0edc15b0a0b0708079db7611c17fce15a2
MD5 7d9d19172369774c517826ec458bd053
BLAKE2b-256 f8f2c8cd42796c20c27c9cbd7b774ecd80dfb46b0d7fc18d4bbb0f26339e3f25

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page