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
When I run async tests using pytest-asyncio (marked with @pytest.mark.asyncio) after integration tests using playwright-pytest (which only uses playwright.sync_api calls), then those tests fail with the below error message. If I run the async tests before the integration tests then everything works fine.
Why is there still some event loop running after the integration tests finished even if I don't use async calls with Playwright?
Edit:
After some research, it seems to be a known problem, which is simply an incompatibility between pytest-asyncio and playwright-pytest. playwright-pytest seems to start an event loop (even when using the sync API) and pytest-asyncio doesn't get along with an already started one.
When I run async tests using
pytest-asyncio
(marked with@pytest.mark.asyncio
) after integration tests usingplaywright-pytest
(which only usesplaywright.sync_api
calls), then those tests fail with the below error message. If I run the async tests before the integration tests then everything works fine.Why is there still some event loop running after the integration tests finished even if I don't use async calls with Playwright?
Edit:
After some research, it seems to be a known problem, which is simply an incompatibility between
pytest-asyncio
andplaywright-pytest
.playwright-pytest
seems to start an event loop (even when using the sync API) andpytest-asyncio
doesn't get along with an already started one.See pytest-dev/pytest-asyncio#359
The text was updated successfully, but these errors were encountered: