You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In pytest-dev/pytest-asyncio@c74d1c3, pytest-asyncio==0.24.0 (which is a pytest plugin) added a PytestDeprecationWarning that I am now trying to silence.
I have noticed this PytestDeprecationWarning is different from normal dependencies' DeprecationWarning because it's emitted beforepytest loads, instead of at test time.
I have configured filterwarnings for many normal packages, but I can't get it to work for this "pre-pytest loaded" PytestDeprecationWarning:
[tool.pytest.ini_options]
filterwarnings = [
'ignore:configuration option "asyncio_default_fixture_loop_scope" is unset',
]
I have concluded that filterwarnings doesn't seem to work on pytest plugins.
Thus, I think this is a sort of bug, so I am requesting to apply filterwarnings also to pytest plugins, not just normal test time dependencies.
The text was updated successfully, but these errors were encountered:
jamesbraza
changed the title
filterwarnings doesn't work for pytest plugins
Bug: filterwarnings doesn't work for pytest plugins
Aug 30, 2024
Pytest will intercept and capture warnings in the collection of use cases.
Prior to this, if wanted to filter specified warnings, couldn't rely on pytest but on python.
In pytest-dev/pytest-asyncio@c74d1c3,
pytest-asyncio==0.24.0
(which is apytest
plugin) added aPytestDeprecationWarning
that I am now trying to silence.I have noticed this
PytestDeprecationWarning
is different from normal dependencies'DeprecationWarning
because it's emitted beforepytest
loads, instead of at test time.I have configured
filterwarnings
for many normal packages, but I can't get it to work for this "pre-pytest
loaded"PytestDeprecationWarning
:I have concluded that
filterwarnings
doesn't seem to work onpytest
plugins.Thus, I think this is a sort of bug, so I am requesting to apply
filterwarnings
also topytest
plugins, not just normal test time dependencies.The text was updated successfully, but these errors were encountered: