Request the feature to apply indirect=True on particular argnames #714
Labels
topic: parametrize
related to @pytest.mark.parametrize
type: enhancement
new feature or API change, should be merged into features branch
Originally reported by: Alina Berdnikova (BitBucket: freakbelka, GitHub: freakbelka)
According to http://pytest.org/latest/parametrize.html#the-metafunc-object, if indirect=True it'll
pass each argvalue to its corresponding fixture function.
It would be great if there was a way to specify which arguments are to be passed as params to corresponding fixtures and which are to be passed directly to test -- for example, via explicitly listing names of those indirectly-parametrized fixtures.
If argument name is listed in indirect= list, but corresponding fixture is nowhere to be found, an error should be raised.
And if the argument not listed in the indirect= clause, it should be passed directly as a test parameter despite corresponding fixture being defined or not.
I'm expecting this code
to output this:
The text was updated successfully, but these errors were encountered: