Skip to content

Pytest: Allow coroutine fixtures #2223

Closed
@k4nar

Description

pytest-asyncio provides a very nice feature, which is to allow coroutine fixtures. For example it makes possible to create a fixture making asynchronous DB requests.

Unfortunately pytest-asyncio and pytest-aiohttp seems to no longer be compatible. So far this is the only feature that I'm missing, so it would be awesome if it were added to pytest-aiohttp.

Here is the implementation in pytest-asyncio:
https://github.com/pytest-dev/pytest-asyncio/blob/92b34e5e9a14c45062d6ce2e2686ed8b11c7c03e/pytest_asyncio/plugin.py#L52-L134

I've tried to adapt it to pytest-aiohttp but unsuccessfully so far.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions