You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1) A new test case that fails with 0.12.0, and pass with this commit.
test_async_fixtures_with_finalizer_scope.py:
2) Main problem is due to side effects of asyncio.get_event_loop(). See:
https://github.com/python/cpython/blob/3.8/Lib/asyncio/events.py#L636
This method could either return an existing loop or create a new one.
This commit replaces all asyncio.get_event_loop() with previous pytest-asyncio code (0.10.0), so plugin uses the loop provided by event_loop fixture (instead of calling asyncio.get_event_loop())
Except following block, that has not been modified in this commit (as it behaves similar to 0.10.0)
https://github.com/pytest-dev/pytest-asyncio/blob/v0.12.0/pytest_asyncio/plugin.py#L54-L66
Changes are for using always the new loop provided by event_loop fixture.
Instead of calling get_event_loop() that:
- either returns global recorded loop (with set_event_loop()) in case there is one,
- or otherwise creates and record a new one
0 commit comments