Skip to content

Warn when passing scope as positional argument #812

Closed
@Cito

Description

@Cito

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions