You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider this issue as a feature request please. I suggest to add more flexibility to how parameters for tests are combined. In pytest tests are executed for each combination (cartesian product) of all parameters. I was glad to find fixture_union in pytest cases that introduces flexibility in combining fixture parameters for tests. I suggest to add further options to combine fixtures: zip join to combine fixture sets by position number in a set. This will allow to test actual and expected states determined for each test object in different fixtures:
Note that the implementation could construct a namedtuple so that both index-based access and named access (as in your example) works.
EDIT: sorry I rushed into this answer too fast. Developing such a feature might be quite tideous, as the internal engine does not support it and therefore would need to be adapted (the "fixture trees" and callspec generator). So maybe it is not worth doing until #170 is done (yet, there is no plan to tackle #170 in the near future :( ). For now the best workaround is probably to create a fixture parametrized with the zipped params, and then to unpack it using unpack_fixture, into two independent fixtures.
Consider this issue as a feature request please. I suggest to add more flexibility to how parameters for tests are combined. In pytest tests are executed for each combination (cartesian product) of all parameters. I was glad to find fixture_union in pytest cases that introduces flexibility in combining fixture parameters for tests. I suggest to add further options to combine fixtures: zip join to combine fixture sets by position number in a set. This will allow to test actual and expected states determined for each test object in different fixtures:
The text was updated successfully, but these errors were encountered: