Resolve param indices using param values, not parameterset index
To compute param indices smarter when user passes multiple parameter sets with duplicate values to parametrize in order to have a better reordering experience. Currently we have :
@pytest.fixture(scope='module')
def fixture1(request):
pass
@pytest.fixture(scope='module')
def fixture2(request):
pass
@pytest.mark.parametrize("fixture1, fixture2", [("a", 0), ("b", 1), ("a", 2)], indirect=True)
def test(fixture1, fixture2):
pass
resulting in inefficient ordering i.e.
<Function test[a-0]>
<Function test[b-1]>
<Function test[a-2]>
It's a follow-up to #11220 .
@bluetech after some review of #519 and #2207 i believe it looks fair to consider the ordering more correct
i think we need a crosscheck of how we can observe interactions if people have multiple tests with different sets of parameters and their setup/teardown
@sadra-barikbin Can you please rebase this on latest main?
Apologies but I'll be delayed in reviewing this, I'm still down with a cold
It would have been nice to land this in 8.x
Apologies but I'll be delayed in reviewing this, I'm still down with a cold
It would have been nice to land this in 8.x
It's alright. I hope you recover soon.
@bluetech , could you please review the PR too?
Hi @sadra-barikbin, do we have any plan to merge this PR, please? cc. @RonnyPfannschmidt
Just resolved a minor conflict. Let's see if we can get this merged as it is already approved.
Our shiny new bot also enforces changelog entries now, so this needs to be added before it can be merged - could you please add that @sadra-barikbin?