-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please error when fixtures conflict #3346
Comments
Overriding fixtures is also a feature, so I don't think that's possible. |
@The-Compiler Mark the overriding fixture as intentionally overriding, then. |
That'd be a possibility, with an appropriate deprecation period. |
Hmm, we don't mark fixtures, only test functions. But This could make some plugins which provide the same fixture no longer co-installable though. Not sure if that exists in practice, the the lack of namespacing in fixtures doesn't make this too far fetched though. Making enabling this exclusion opt-in in pytest.ini might be a suitable solution though. Would you mind having a go at a pull request for this? Feel free to ask questions! (also on freenode/#pylib on IRC) |
I'll see what I can do, though frankly the pytest internals are not easy to understand and my time is limited. :-/ |
@flub that topic in particular is so freakishly messy that i suspect 3-4 attempts each about 3-4 workdays are needed to sort out (marks was simpler) |
Closing this in favor of #3966, which has a more detailed plan for what we should do and warn about when overriding fixtures. |
The
pytest_toolbox
module also contains acaplog
fixture, which broke a few of my tests. Finding that bug was no fun.pytest should raise an error when it encounters conflicting fixtures.
The text was updated successfully, but these errors were encountered: