Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests raising StopIteration break pytest/pluggy #12929

Open
RonnyPfannschmidt opened this issue Oct 31, 2024 · 0 comments · May be fixed by #12934
Open

tests raising StopIteration break pytest/pluggy #12929

RonnyPfannschmidt opened this issue Oct 31, 2024 · 0 comments · May be fixed by #12934
Assignees
Milestone

Comments

@RonnyPfannschmidt
Copy link
Member

RonnyPfannschmidt commented Oct 31, 2024

i just found that in a testsuite

i already fixed pluggy via pytest-dev/pluggy#545

however afterwards i learned that yield from creates a barrier for the error handling implemented for that

at least https://github.com/pytest-dev/pytest/blame/main/src/_pytest/unraisableexception.py#L89-L100 uses yield from

in those cases the RuntimeError escapes into the generator and cannot be handled correctly anymore

the correct solution would be a contextmanager
pytest --lf -p no:unraisableexception -p no:threadexception -p no:loggingis currently needed for me to have it work

each of the disabled plugins uses yield from in hook wrappers

@RonnyPfannschmidt RonnyPfannschmidt self-assigned this Nov 2, 2024
@RonnyPfannschmidt RonnyPfannschmidt added this to the 8.4 milestone Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant