flaky + pytest-asyncio: RuntimeError: Event loop is closed
- Dominant language
- Python
- Stars
- 398
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
Latest `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
Contributor guide
Research direction
Start with the minimal reproducible example at https://github.com/dimaqq/mre-loop-closed and compare its behavior with the cross-posted pytest-asyncio issue. Reproduce the interaction among pytest, pytest-asyncio, and flaky; done means a failed flaky test is reported as a failure and retried instead of breaking with a closed event loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100