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

Configuration option for default loop scope #793

Open
seifertm opened this issue Feb 28, 2024 · 0 comments
Open

Configuration option for default loop scope #793

seifertm opened this issue Feb 28, 2024 · 0 comments
Milestone

Comments

@seifertm
Copy link
Contributor

seifertm commented Feb 28, 2024

When a user wants to run all tests in a session-scoped event loop, the documentation suggests implementing a pytest_collection_modifyitems hook.

In auto mode the hook causes duplicate asyncio markers to be attached to test items. This is a cosmetic issue, but creates additional noise when debugging item markers.

In strict mode the behavior of the hook rules out manual overrides of the asyncio mark.

A configuration option for the default loop scope as suggested in #705 (comment) would eliminate duplicate asyncio markers in auto mode and allow overriding the default loop scope with explicit markers in strict mode.

@seifertm seifertm added this to the v1.0 milestone Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant