This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

pytest-finer-verdicts

A pytest plugin to treat non-assertion failures as test errors.

Getting the plugin

The plugin can be installed via pip install pytest-finer-verdicts. Similarly, it can be uninstalled via pip uninstall pytest-finer-verdicts.

Usage

Consider the following snippet in a file test.py (available as temp/test.py in the repository).

class Engine:
    def rotations(self):
        return 51
    def getTemp(self):
        return 75


def test_pass():
    o = Engine()
    while o.rotations() < 50:
        pass
    assert o.getTemp() <= 75


def test_fail():
    o = Engine()
    while o.rotations() < 50:
        pass
    assert o.getTemp() <= 70


def test_error():
    o = Engine()
    while o.rotations() < 50:
        pass
    raise RuntimeError()
    assert o.getTemp() <= 75

Without pytest-finer-verdicts plugin, py.test test.py -v will produce the following output.

collected 3 items

test.py::test_pass PASSED
test.py::test_fail FAILED
test.py::test_error FAILED

=================================== FAILURES ===================================
__________________________________ test_fail ___________________________________

    def test_fail():
        o = Engine()
        while o.rotations() < 50:
            pass
>       assert o.getTemp() <= 70
E       assert 75 <= 70
E        +  where 75 = <bound method Engine.getTemp of <test.Engine object at 0x10597c6a0>>()
E        +    where <bound method Engine.getTemp of <test.Engine object at 0x10597c6a0>> = <test.Engine object at 0x10597c6a0>.getTemp

test.py:19: AssertionError
__________________________________ test_error __________________________________

    def test_error():
        o = Engine()
        while o.rotations() < 50:
            pass
>       raise RuntimeError()
E       RuntimeError

test.py:26: RuntimeError
====================== 2 failed, 1 passed in 0.04 seconds ======================

With pytest-finer-verdicts plugin, py.test test.py -v will produce the following output.

collected 3 items

test.py::test_pass PASSED
test.py::test_fail FAILED
test.py::test_error ERROR

==================================== ERRORS ====================================
_________________________ ERROR at setup of test_error _________________________

    def test_error():
        o = Engine()
        while o.rotations() < 50:
            pass
>       raise RuntimeError()
E       RuntimeError

test.py:26: RuntimeError
=================================== FAILURES ===================================
__________________________________ test_fail ___________________________________

    def test_fail():
        o = Engine()
        while o.rotations() < 50:
            pass
>       assert o.getTemp() <= 70
E       assert 75 <= 70
E        +  where 75 = <bound method Engine.getTemp of <test.Engine object at 0x105885e80>>()
E        +    where <bound method Engine.getTemp of <test.Engine object at 0x105885e80>> = <test.Engine object at 0x105885e80>.getTemp

test.py:19: AssertionError
================= 1 failed, 1 passed, 1 error in 0.04 seconds ==================

Notice how test_error is flagged as a test error by the plugin.

Release History

Release History

1.0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pytest_finer_verdicts-1.0.3-py2.7.egg (3.8 kB) Copy SHA256 Checksum SHA256 2.7 Egg Jun 29, 2016
pytest_finer_verdicts-1.0.3-py2.py3-none-any.whl (4.8 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jun 29, 2016
pytest_finer_verdicts-1.0.3-py3.4.egg (3.9 kB) Copy SHA256 Checksum SHA256 3.4 Egg Jun 29, 2016
pytest_finer_verdicts-1.0.3-py3.5.egg (3.9 kB) Copy SHA256 Checksum SHA256 3.5 Egg Jun 29, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting