pytest-dev / pytest-dev/pytest-qt

filterwarnings does not seem to work

Open
#338 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
455
Forks
72
Avg merge
12h 26m
Merged PRs (30d)
1

Description

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...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/test_wait_signal.py and the warning reported at pytestqt/plugin.py:226. Run the focused test and inspect how the filterwarnings marker relates to the deprecation warning. Done means explaining or correcting why the warning remains in the summary, with the focused test passing without that warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.