support yield in pytest
Open
typechecking
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 516
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
```py
from pytest import fixture as reusable
@reusable
def user_id():
yield 42
def test_lookup(user_id):
assert user_id > 0
```
this is not supported yet.
### Sandbox Link
_No response_
### (Only applicable for extension issues) IDE Information
_No response_
Contributor guide
Research direction
Use the reported pytest fixture example as the reproduction: a fixture aliased from pytest.fixture yields 42 and should provide an integer to test_lookup. Locate Pyrefly's handling of pytest fixtures and run the relevant fixture or type-checker tests; done means this example type-checks with user_id inferred as a usable value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100