You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove _pytest.compat.is_generator() and just use inspect.isgeneratorfunction() directly #12960
It's already equivalent in practice, and deleting the few uses and handful of tests will make it easier for contributors to understand code which uses the stdlib function instead.
While we're there, I'd like to turn the xfail on "yield tests" - a noop since Pytest 4! - into a hard error, to reduce the risk that users incorrectly believe that they're testing something.
just the xfail, which is guarded by the condition in your diff in src/_pytest/python.py. yield fixtures are fine.
in test_compat.py, just delete the affected tests - we don't need tests for the stdlib function.
in general I'd encourage you to open a PR with your current state and ask any questions there - the review interface is really helpful for tracking work-in-progress, not just finished or polished contributions!
Activity
RonnyPfannschmidt commentedon Nov 16, 2024
go for it, thanks !
Zac-HD commentedon Nov 16, 2024
src/_pytest/python.py. yield fixtures are fine.and thanks for helping out!
Merge pull request #12968 from arpitgupta-it/refactor/remove-is-gener…
Merged PR 5358: Update dependency pytest to v8
chore(deps): update dependency pytest to v9 (#305)