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

Mention scoping limitation for event loop fixtures #577

Merged

Conversation

seifertm
Copy link
Contributor

@seifertm seifertm commented Jul 12, 2023

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

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>
@seifertm seifertm merged commit df88119 into pytest-dev:main Jul 12, 2023
9 checks passed
@seifertm seifertm deleted the improve-event-loop-fixture-scope-docs branch October 23, 2023 06:15
@seifertm seifertm restored the improve-event-loop-fixture-scope-docs branch October 23, 2023 08:17
@seifertm seifertm deleted the improve-event-loop-fixture-scope-docs branch October 23, 2023 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant