is there a way to use the @incremental plugin like described att Pytest: how to skip the rest of tests in the class if one has failed? mixed with @pytest.mark.parametrize like below:
@pytest.mark.incremental
Class TestClass:
@pytest.mark.parametrize("input", data)
def test_preprocess_check(self,input):
# prerequisite for test
@pytest.mark.parametrize("input",data)
def test_process_check(self,input):
# test only if test_preprocess_check succeed
The problem i encountered is, at the first fail of test_preprocess_check with a given input of my data set, the following test_preprocess_check and test_process_check are labeled "xfail". The behaviour i expect will be, at each new "input" of my parametrized data set, the test will act in an incremental fashion.
ex: data = [0,1,2]
if only test_preprocess_check(0) failed:
i got the following report: 1 failed, 5 xfailed
but i expect the report: 1 failed, 1 xfailed, 4 passed
Thanks