pytest-dev / pluggy

A minimalist production ready plugin system
https://pluggy.readthedocs.io/en/latest/
MIT License
1.29k stars 123 forks source link

result: add `result.force_exception` API #394

Closed bluetech closed 1 year ago

bluetech commented 1 year ago

Hookwrappers do not currently provide a public, proper way to override or force an exception. Raising directly from the hookwrapper causes further wrappers to be skipped, but this is not something we want to change at this point, for fear of breaking things, and because we are adding a replacement. See #244 on this issue.