2016-06-22 18:21:51 +08:00
|
|
|
pytest-warnings
|
|
|
|
===============
|
|
|
|
|
|
|
|
py.test plugin to list Python warnings in pytest report
|
|
|
|
|
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
|
|
|
install via::
|
|
|
|
|
|
|
|
pip install pytest-warnings
|
|
|
|
|
|
|
|
if you then type::
|
|
|
|
|
|
|
|
py.test -rw
|
|
|
|
|
|
|
|
any warnings in your code are reported in the pytest report.
|
|
|
|
You can use the ``-W`` option or ``--pythonwarnings`` exactly like for the ``python`` executable.
|
|
|
|
|
|
|
|
The following example ignores all warnings, but prints DeprecationWarnings once per occurrence::
|
|
|
|
|
|
|
|
py.test -rw -W ignore -W once::DeprecationWarning
|
|
|
|
|
|
|
|
You can also turn warnings into actual errors::
|
|
|
|
|
|
|
|
py.test -W error
|
|
|
|
|
|
|
|
|
|
|
|
Changes
|
|
|
|
=======
|
|
|
|
|
2016-06-27 17:32:54 +08:00
|
|
|
0.1 - 2016-06-27
|
2016-06-22 18:21:51 +08:00
|
|
|
----------------
|
|
|
|
|
|
|
|
- Initial release.
|
|
|
|
[fschulze (Florian Schulze)]
|