Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest plugin's async fixtures don’t work with pytest 3.7.0 #3169

Closed
hynek opened this issue Aug 1, 2018 · 4 comments
Closed

pytest plugin's async fixtures don’t work with pytest 3.7.0 #3169

hynek opened this issue Aug 1, 2018 · 4 comments
Labels

Comments

@hynek
Copy link
Contributor

hynek commented Aug 1, 2018

Long story short

Tests that rely on

@pytest.fixture
async def x():
    yield

stopped working with pytest 3.7.0. Instead of the fixture you get an async_generator.

I’ve been told that some fixture handling code in pytest changed so I’m opening the bug here. Happy to redirect to pytest if necessary.

Expected behaviour

That it keeps working. :)

Actual behaviour

It passes an async_generator instead of the fixture.

Steps to reproduce

Define an async fixture that yields itself and try to use it.

Your environment

Python 3.7.0, pytest 3.7.0, aiohttp 3.3.2.

@asvetlov
Copy link
Member

asvetlov commented Aug 1, 2018

Thanks for the report

@hynek
Copy link
Contributor Author

hynek commented Aug 6, 2018

Looks like they reverted that changes in 3.7.1 – sorry for the noise.

@hynek hynek closed this as completed Aug 6, 2018
@asvetlov
Copy link
Member

asvetlov commented Aug 6, 2018

Oh, cool!

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants