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
We have some tests using the end to end framework provided by Shiny for Python, which uses Playwright. However as a lot of our code is async, we also need to use pytest-asyncio. These two don't seem to play well together, and even adding in nest_asyncio, we still get an error during teardown even though the actual tests pass:
RuntimeError: Cannot close a running event loop
We have tried a few of the suggestions found around the internet but so far none of them have fixed the error. For now we have marked the Shiny tests to be skipped because we don't want errors in our test runs, however we do need to fix this at some point. If anyone wants to have a go, we would welcome contributions to attempt to fix this issue.
One path we haven't explored is using anyio instead of pytest-asyncio, we haven't investigated this solution yet so we're unsure of how valid it may be.
The text was updated successfully, but these errors were encountered:
We have some tests using the end to end framework provided by Shiny for Python, which uses Playwright. However as a lot of our code is async, we also need to use pytest-asyncio. These two don't seem to play well together, and even adding in nest_asyncio, we still get an error during teardown even though the actual tests pass:
RuntimeError: Cannot close a running event loop
We have tried a few of the suggestions found around the internet but so far none of them have fixed the error. For now we have marked the Shiny tests to be skipped because we don't want errors in our test runs, however we do need to fix this at some point. If anyone wants to have a go, we would welcome contributions to attempt to fix this issue.
One path we haven't explored is using anyio instead of pytest-asyncio, we haven't investigated this solution yet so we're unsure of how valid it may be.
The text was updated successfully, but these errors were encountered: