python-trio / python-trio/trio
idea: use sys.set_coroutine_wrapper in the test suite to enforce assert_yields *everywhere*
Open
Nobody has claimed this yet.
pytest-trio relevant
todo soon
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
Like:
@types.coroutine
def enforce_checkpoint(coro):
with assert_yields():
yield from coro.__await__()
sys.set_coroutine_wrapper(enforce_checkpoint)
and calling this from conftest.py
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.
Research direction
Start by reading conftest.py and the existing assert_yields usage, then verify how sys.set_coroutine_wrapper and the proposed enforce_checkpoint wrapper interact with the test suite. Done means the suite enforces assert_yields for all relevant coroutines without breaking existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100