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

Warn when passing scope as positional argument #812

Open
Cito opened this issue Apr 10, 2024 · 0 comments
Open

Warn when passing scope as positional argument #812

Cito opened this issue Apr 10, 2024 · 0 comments

Comments

@Cito
Copy link
Member

Cito commented Apr 10, 2024

Recently I used pytest.mark.asyncio("session") instead of pytest.mark.asyncio(scope="session").

It took me quite a while to find out why the corresponding test was function scoped instead of session scoped.

It would be nice if either the scope could be passed as positional argument as well, or if there would be a helpful warning or error message in that case, instead of silently swallowing the positional argument.

I can contribute a PR for this feature if you let me know which exact behavior you prefer.

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

No branches or pull requests

1 participant