Currently, pytest flags a test case as failed if there is either an uncaught exception or an assertion violation during the execution of the test case. This conflates failures in the UUT or the test case (that do not pertain to the property being tested) as violation of the property being tested.
This issue is addressed by *pytest-finer-verdicts* plugin. The plugin changes the reporting scheme to report assertion violations as test failures (F) and other kinds of failures as test errors (E).
The plugin is available on PyPI -- https://pypi.python.org/pypi/pytest-finer-verdicts/ https://pypi.python.org/pypi/pytest-finer-verdicts/1.0.
We hope you find the plugin useful.
Venkatesh-Prasad Ranganath http://about.me/rvprasad