I have two test cases test_A(a,b,c) and test_B(a,b,c) in a python file. I use parameterization ( metafunc.parametrize("a,b,c",[(a1,a2,a3),....(y1,y2,y3)]) to pass 6 set of parameters to these tests.
The parameters are like this
Params_A | Params_B |
---|---|
(a1,a2,a3) | (x1,x2,x3) |
(b1,b2,b3) | (y1,y2,y3) |
(c1,c2,c3) | (y1,y2,y3) |
Right now I can execute both tests with all 6 parameters. Now I want to pass only Params_A to test_A and if test_A fails for eg., with params (b1,b2,b3), I need to execute test_B with the corresponding params (y1,y2,y3).
I don't know how to go about this. Any pointers would be very helpful
I wrote the tests. I tried using fixtures, mark.skipif, pytest_runtest_makereport but no luck so far. And test_A and test_B do the same thing. I created the second test to be able to split the 6 parameter sets equally between the tests.