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
Fix CI/CD tests with pytest-asyncio and no explicit declaration of event_loop fixture (as it is not used). This only affects CI/CD and local development, not the framework itself.
Part 1: Reveals itself as async tests freezing with no reaction for long time: due to fixtures (e.g. aresponses, aiohttp server, etc) created in different event loops than the test itself.
Originally caused by pytest-asyncio upgrade from 0.10.0 to 0.11.0 (diff).
Fixed by auto-adding asyncio markers for all async tests even earlier than before, so that pytest-asyncio could notice them on item creation.
Part 2: In that case, some tests fail due to event loop is not running when they try to create event-loop dependent objects. E.g. aresponses says: The object should be created from async function.
As an all-in-one fix, bot prepare it for pytest-asyncio==0.11.0 by fixing the freezes, but roll back to 0.10.0 (and therefore, pytest<5.4.0) for now, until the event_loop issue is resolved.
What do these changes do?
Fix CI/CD tests with pytest-asyncio and no explicit declaration of
event_loop
fixture (as it is not used). This only affects CI/CD and local development, not the framework itself.Blocks #350 #351 and all new PRs.
Description
Part 1: Reveals itself as async tests freezing with no reaction for long time: due to fixtures (e.g. aresponses, aiohttp server, etc) created in different event loops than the test itself.
Originally caused by pytest-asyncio upgrade from 0.10.0 to 0.11.0 (diff).
Fixed by auto-adding
asyncio
markers for all async tests even earlier than before, so that pytest-asyncio could notice them on item creation.Part 2: In that case, some tests fail due to event loop is not running when they try to create event-loop dependent objects. E.g.
aresponses
says:The object should be created from async function
.Caused by: pytest-dev/pytest-asyncio#154 (since 0.11.0). Fixed in: pytest-dev/pytest-asyncio#156 (not yet merged and released to the moment).
As an all-in-one fix, bot prepare it for pytest-asyncio==0.11.0 by fixing the freezes, but roll back to 0.10.0 (and therefore, pytest<5.4.0) for now, until the event_loop issue is resolved.
Issues/PRs
Type of changes
Checklist
CONTRIBUTORS.txt
The text was updated successfully, but these errors were encountered: