Skip to content

qtbot.assertNotEmitted: Add support for multiple signals at once - #679

Open
t20100 wants to merge 2 commits into
pytest-dev:mainfrom
t20100:assertNotEmitted-multiple-signals
Open

t20100 wants to merge 2 commits into
pytest-dev:mainfrom
t20100:assertNotEmitted-multiple-signals

Conversation

@t20100

@t20100 t20100 commented Oct 23, 2026

Copy link
Copy Markdown

This PR proposes to support multiple signals in assertNotEmitted to make the syntax lighter when multiple signals are expected not to emit (closes #678).

It proposes to add support for a sequence of signals as first argument to be consistent with qtbot.waitSignals:

with qtbot.assertNotEmitted([signal1, signal2]):
   pass

This PR also fixes an issue in the assertNotEmitted tests that were calling fnmatch.fnmatchcase without asserting the match: replaced with pytest.raises's match argument.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support of multiple signals to qtbot.assertNotEmitted

1 participant