Unable to combine xfail and parametrize #9695
-
Thanks for a great package I know that you can do things like
But the question is how to handle the case where you have combination of parametrized parameters. I want to mark the test where
Ideally the solution would be something like
thanks for reading |
Beta Was this translation helpful? Give feedback.
Answered by
nicoddemus
Feb 16, 2022
Replies: 1 comment 1 reply
-
Hi @pablojadz,
You can call @pytest.mark.parametrize('param1', [0, 1])
@pytest.mark.parametrize('param2', [0, 1])
def test(param1, param2):
if param1 and param2:
pytest.xfail(reason="param1 and param2 are 1") |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
pablojadz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @pablojadz,
You can call
pytest.xfail
explicitly inside the test: