Is it possible to import Failed
properly?
#13093
Answered
by
RonnyPfannschmidt
eliegoudout
asked this question in
Q&A
-
Hello, In my testing setup, I factored some tests in a "check_this_should_fail" that contains a few special_broken_behaviour = ... # created in this test
with pytest.raises(Failed):
check_this_should_fail(special_broken_behaviour) # Will not fail since specially broken No, for this, I can use from _pytest.outcomes import Failed but it's obviously not intended. Is it on purpose to avoid some kind of anti-pattern? Are there any other way or should I drop this idea altogether? I don't think it's trivially an anti-pattern to wanna make Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
RonnyPfannschmidt
Dec 30, 2024
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
eliegoudout
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pytest.fail.Exception