pytest-dev / pytest-dev/pytest-asyncio
[Feature Request] Event-Loop fixture that does not automatically advance time
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 207
- Avg merge
- 5h 35m
- Merged PRs (30d)
- 9
Description
It would be ideal to add an additional clock_event_loop fixture with a custom AbstractEventLoop. Instead, this one would only advance time explicitly similar to the twisted.internet.task.Clock useful for testing twisted reactors. This would allow for tests to advance time and test time-based features to verify that they are correctly running when expected without having to wait for time to progress. If there is a different way to achieve this goal, I would appreciate the advice if I missed something.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by locating the existing event-loop fixture implementation and reviewing how a custom AbstractEventLoop could control time without automatic advancement. Compare the intended behavior with twisted.internet.task.Clock; done means tests can explicitly advance time and verify time-based features without waiting for real time to pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100