flaky + pytest-asyncio: RuntimeError: Event loop is closed
See original GitHub issueLatest pytest
, pytest-asyncio
and flaky
just can’t live happily together.
When a flaky test fails, an error RuntimeError: Event loop
is closed is reported instead of failure.
Edit: In fact, first test failure breaks the harness and “flaky” test is not retried.
MRE: https://github.com/dimaqq/mre-loop-closed
Edit: cross-posted to https://github.com/pytest-dev/pytest-asyncio/issues/178
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
RuntimeError: Event loop is closed" when using pytest ...
I had the exact same problem. The good news is that it looks like aiohttp has a fix for this problem. The bad...
Read more >asyncio runtimeerror event loop is closed - You.com | The AI ...
Latest pytest , pytest-asyncio and flaky just can't live happily together. When a flaky test fails, an error RuntimeError: Event loop is closed...
Read more >mozilla-central: changeset 568432 ...
Set event loop scope to session(assuming it would reuse the same event loop for all tests) to avoid event loop is closed error...
Read more >Pytest-asyncio: Pytest Support for Asyncio - Morioh
Creates and injects a new instance of the default asyncio event loop. By default, the loop will be closed at the end of...
Read more >Advanced asyncio testing - Stefan Scherfke
Fixtures allow you to create a clean event loop instance for every ... import pytest @pytest.mark.asyncio async def test_coro(event_loop): ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
See https://github.com/pytest-dev/pytest-asyncio/issues/248
@jaredar1232 I think a release in the near future would make sense, especially because of the deprecations around async fixture handling.
@Tinche @asvetlov Would it make sense to release pytest-asyncio v0.17? Or is there something that needs to be done before that?