-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Feature proposal: Capability to mark tests as xfail #122
Comments
I'm glad you are finding the plugin useful. With the functions, I could imagine an extra def test_foo(check):
check.equal(1, 2, xfail="they're not equal") or more explicitly, perhaps: def test_foo(check):
check.equal(1, 2, xfail_reason="they're not equal") For the context manager case, I'm not sure how that could be expressed. Perhaps also a parameter: def test_foo(check):
with check(xfail_reason="they're not equal"):
assert 1 == 2 Something like this might work. |
I'm using only the context manager, but I didn't knew that I can define a xfail_reason with the helpers, so maybe I can use it for these cases. I previously discarded the helpers because I lose the introspection of pytest assertions. Thanks for your answer. |
Oh. You can't use xfail_reason, yet. |
I'll prefer |
But actually, wouldn't it better to have the possibility to choose between By default, the plugin sets the Perhaps we can have the possibility to choose between Something like this ?
|
For me I am using pytest-check especially because I have a lot of "expected fails" and I don't want them to stop the test. |
Would this proposal be useful in the following context? I'm trying to understand it more (and whether this library is something I want to invest in).
Cheers! |
I had to write multiple assertions in the same test and this plugin is awesome. As the same way that you can capture one error and continue executing assertions It would be great if the assertion fails be able to mark it as xfail as the same way that you can do for the whole test or param.
The text was updated successfully, but these errors were encountered: