Mention scoping limitation for event loop fixtures#577
Merged
seifertm merged 3 commits intoJul 12, 2023
Conversation
The example for overriding event loop scopes now uses a module scope rather than a session scope. Due to the constraint that event_loop fixture scopes should not overlap, a session-scoped fixture is usually not that helpful. Addresses pytest-dev#531 Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…nal possible cause. Closes pytest-dev#531 Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
…he docs. The headings no longer use the "pre-formatted" text style. Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fixture reference does not mention the fact that the scopes of event_loop fixtures should not overlap. People may run into warnings and errors when they use overlapping scopes. (see #531)
This PR mentions the scoping limitation in the fixtures reference and extends the warning message for unclosed event loops to point users to a potential scoping issue.
Closes #531