passing functions to indirect parametrization instead of string #8146
Labels
topic: fixtures
anything involving fixtures directly or indirectly
topic: parametrize
related to @pytest.mark.parametrize
type: proposal
proposal for a new feature, often to gather opinions or design the API around the new feature
What's the problem this feature will solve?
Currently when parametrizing a test indirectly through fixtures, the name of the fixture that the parameters will be passed to is specified as a string. For example:
This approach is problematic because IDE's can't find usages of fixtures when these are passed as strings.
Also IDE's can't notice if the fixture's name is passed incorrectly.
Describe the solution you'd like
I propose to allow the parametrize method to receive function objects who's name can be retrieved internally in parametrize with the .name attribute of functions. Example:
Waiting for feedback so I could perhaps implement this feature.
Thanks,
Vert
The text was updated successfully, but these errors were encountered: