Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect event loop fixture override warnings #647

Merged

Conversation

seifertm
Copy link
Contributor

The existing code relies on the __original_func attribute to be true on FixtureDef.func. For some reason, this is not always the case, even though the event_loop fixture sets the attribute in the function body.

This PR changes the warning to be triggered when the signature of the test function contains the event_loop argument, in which case the problem seems to go away..

…verrides to be emitted, even though the fixture was not overridden.

Signed-off-by: Michael Seifert <[email protected]>
@seifertm seifertm added this pull request to the merge queue Oct 27, 2023
Merged via the queue into pytest-dev:main with commit 9f75b3c Oct 27, 2023
@seifertm seifertm deleted the fix-incorrect-event-loop-override-warnings branch October 27, 2023 10:26
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.

1 participant