Michael Seifert

Results 244 comments of Michael Seifert

In my opinion, pytest-asyncio should raise an error when the user tries to decorate synchronous tests with `pytest_asyncio.fixture`. There should only be one way to decorate those fixtures and pytest...

The propagation of contextvars between fixtures and tests in pytest-asyncio was previously limited to Python 3.11 and above. As of pytest-asyncio v1.1.0, this should work for all supported Python versions....

Great! Let me know if you encounter any issues or if you need a few pointers.

That sounds like a reasonable approach. I noticed it's possible for the venv to contain an outdated version of pytest-asyncio. This may lead to outdated values for _release_, if we...

@ka28kumar I'd prefer the use of `importlib.metadata`, because it is part of the standard library in recent versions of Python.

That's an interesting point! We didn't consider an option to always match *loop_scope* to *scope*. Essentially, this is the behavior when `asyncio_default_fixture_loop_scope` is unset, but leaving it unset gives a...

Starting from pytest-asyncio v0.23, every level of the pytest test collection hierarchy has its own asyncio event loop. By default, tests marked with `@pytest.mark.asyncio` are run in a function-scope event...

Closing this issue, because I don't have enough information to take any action. Feel free to continue adding comments, though.

Thanks for the reproducer @cstruct ! This seems to be related to the fixture processing code in pytest-asyncio. Async fixtures are processed at collection time. It looks like _foo_ references...

The fix is available in the pytest-async v0.24.0a1 pre-release.