Pytest crash when exception is raised in fixture teardown and --exitfirst flag is set #9213
Unanswered
oleg-kondaurov
asked this question in
Q&A
Replies: 2 comments
-
Currently the only way to change the outcome is by overriding the |
Beta Was this translation helpful? Give feedback.
0 replies
-
Using another issue I discovered, that the trigger of this issue is
No
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
UPD. The issue is reproduced only when
--exitfirst
flag is set, and some test should be skipped after unhandled error in fixture teardown.It is an additional question for closed issue
How to reuse same fixture implementation with different scopes? #3425
#3425 (comment)
Is it possible to somehow trigger the test state to become error or fail in case if an exception is raised in setup or teardown block of the contextmanager?
For example, current code sample causes the unhandled exception and pytest process close:
Beta Was this translation helpful? Give feedback.
All reactions