Override class-level fixture parametrization with method-level parametrization #9175
Labels
topic: fixtures
anything involving fixtures directly or indirectly
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?
Please see the below Python 3.8 code snippet. It involves:
"b"
) applies to all tests"a"
) applies to just a particular methodRunning the
test_something
method viapytest==6.2.5
, it will spit out the following error:Clearly, pytest rejects the duplicated parameterization.
Describe the solution you'd like
I would like if one could somehow "stitch together" parameterization from class-level parameterizations and method-level parameterizations.
The main benefit would be increased flexibility in parameterization of test fixtures. I am not sure how this could be accomplished in practice, though I do think it'd be useful functionality.
Alternative Solutions
I have not tried any alternate solutions.
Additional context
The text was updated successfully, but these errors were encountered: