Skip to content

request.instance is None in async tests #204

@JonathanMeans

Description

@JonathanMeans

This test passes with version 0.10.0:

Pipfile:

[packages] pytest-asyncio = "==0.10.0" pytest = "==5.4.3" 

test_request.py:

import pytest class TestFixture: @pytest.mark.asyncio async def test_fixture(self, request): assert request.instance is not None 

Under 0.11.0 (and higher), it fails:

Pipfile:

[packages] pytest-asyncio = "==0.14.0" pytest = "==5.4.3" 

I don't fully understand everything that's going on with event loops behind the scenes, but I guess I'd expect the behavior to remain the same

Metadata

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