pytest-qt
pytest-qt copied to clipboard
filterwarnings does not seem to work
In tests/test_wait_signal.py
, we have:
@pytest.mark.filterwarnings("ignore:qt_wait_signal_raising is deprecated")
@pytest.mark.parametrize("configkey", ["qt_wait_signal_raising", "qt_default_raising"])
def test_raising_by_default_overridden(qtbot, testdir, configkey):
yet running pytest results in:
=============================== warnings summary ===============================
tests/test_wait_signal.py::test_raising_by_default_overridden[qt_wait_signal_raising]
/home/florian/proj/pytest-qt/.tox/py37-pyside6/lib/python3.7/site-packages/pytestqt/plugin.py:226: DeprecationWarning: qt_wait_signal_raising is deprecated, use qt_default_raising instead.
DeprecationWarning,
-- Docs: https://docs.pytest.org/en/stable/warnings.html
================== 206 passed, 3 skipped, 1 warning in 23.79s ==================
any idea why? I'm stumped...
Sorry for the delay.
I suspect this is because some early warnings cannot really be ignored by pytest's filterwarnings configuration (because they are not captured). I will see if I can investigate this when I have some time to give a definitive answer.