pytest-warnings
Warning
This package is inactive and will not be maintained. The functionality of this package is present in pytest.
py.test plugin to list Python warnings in pytest report.
Integrated in pytest >= 3.1.0.
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
Advance usage
You can get more fine grained filtering of warnings by using the filterwarnings configuration option.
filterwarnings works like the python’s -W flag except it will not escape special characters.
Example
# pytest.ini
[pytest]
filterwarnings= default
ignore:.*is deprecated.*:Warning
error::DeprecationWarning:importlib.*
Changes
0.3.0 - 2017-05-21
Add Travis CI config. [dwaynebailey (Dwayne Bailey)]
Make wheels universal. [aragilar (James Tocknell)]
Since this plugin is integrated in pytest 3.1.0, we show a deprecation warning and advice to uninstall the plugin. [nicoddemus (Bruno Oliveira), fschulze]
0.2.0 - 2016-10-24
Add filterwarnings option. [Carreau (Matthias Bussonnier)]
0.1.0 - 2016-06-27
Initial release. [fschulze (Florian Schulze)]
Release files for pytest-warnings 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest-warnings-0.3.1.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_warnings-0.3.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 8.9 kB
Release files / pytest-warnings-0.3.1.tar.gz
| Download URL | pytest-warnings-0.3.1.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5939f76fe04ad18297e53af0c9fb38aca1ec74db807bd40ad72733603adbbc7d
|
|
BLAKE2b-256 checksum How to use checksums |
e95dc782fd57596801b4eea84243083a80cb666d10dd0b3360123391d0ec7481
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
devpi-server/5.5.0 (py3.7.6; darwin)
|
Release files / pytest_warnings-0.3.1-py2.py3-none-any.whl
| Download URL | pytest_warnings-0.3.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2b779c3f479179fdb5c3935c44105d21c42938d19913523dd26ca34d2e74209a
|
|
BLAKE2b-256 checksum How to use checksums |
012f74fecb0fd1a87272fd29af0c41ea86992a070c47373447b6a544f257c4e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
devpi-server/5.5.0 (py3.7.6; darwin)
|