Skip to content

tests raising StopIteration break pytest/pluggy #12929

Open
@RonnyPfannschmidt

Description

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

Metadata

Labels

type: bugproblem that needs to be addressed

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions