Skip to content

Async fixtures do not support autouse=True #123

Open
@mikenerone

Description

@mikenerone

Async fixtures defined with autouse aren't automatically used. E.g.

@pytest.fixture(autouse=True):
async def clear_some_db_table():
    ...

I'm sure this is a side-effect of the trio-fixture workaround approach explained in the docs, but it still might be possible to find those fixtures and make them work. If not, I think this rub is at least worth specifically mentioning in the docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions