flaky + pytest-asyncio: RuntimeError: Event loop is closed
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- testing-qa
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.
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
- Dominant language
- Python
- Stars
- 397
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from box/flaky
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100