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
{{ message }}
Repository navigation
@pytest.mark.usefixtures take no effects on fixtures #378
Original comment byholger krekel (BitBucket: hpk42, GitHub: hpk42):
usefixtures (and other markers like parametrize for that matter) are not advertised to work on fixture functions, only on test functions. I don't see the advantage of providing usefixtures on a fixture function, in particular.
If you like to see marker support on fixture functions, please open an enhancement issue and provide some ideas/input on the semantics on that. thanks.
...which will upset linters because session isn't used, but it is required for every downstream user of the superuser_headers fixture. Putting on the mark on every downstream user creates a lot of unnecessary text.
I guess another option for an interface would be to allow something like:
Activity
pytestbot commentedon Nov 1, 2013
Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):
usefixtures(and other markers likeparametrizefor that matter) are not advertised to work on fixture functions, only on test functions. I don't see the advantage of providingusefixtureson a fixture function, in particular.If you like to see marker support on fixture functions, please open an enhancement issue and provide some ideas/input on the semantics on that. thanks.
cjw296 commentedon Jan 10, 2025
I wonder if it might be time to re-open this since in the era of linters and type checkers, this becomes more of a problem.
In my case I have:
...which will upset linters because
sessionisn't used, but it is required for every downstream user of thesuperuser_headersfixture. Putting on the mark on every downstream user creates a lot of unnecessary text.I guess another option for an interface would be to allow something like:
Anyway, happy to open a new issue if that's better but this feels like the best one for now.