Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let reorder_items use our new parameter key
Fixes test reordering for indirect parameterization (see pytest-dev#8913). Prior to this commit, reorder_items considered the parameter index to tell if a parameter is "the same" and therefore can be shared. Looking at the index causes trouble if there are multiple parametrizations for the same fixture, basically because one index means different things in different parameter lists. This is fixed here by using the recently introduced parameter key as grouping criterion. Caution: The parameter key ends up inside the key of another dict, and therefore must be hashable. CallSpec2.param_keys is crafted sufficiently, it guarantees to contain comparable and hashable values.
- Loading branch information