Skip to content

Configuration option for default loop scope #793

Closed
@seifertm

Description

@seifertm

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions