Anyway to disable --noconftest? #14715
Unanswered
walrusVision
asked this question in
Q&A
Replies: 2 comments 1 reply
This comment was marked as disruptive content.
This comment was marked as disruptive content.
|
the flag was initially added 11 years ago to let linter plugins not fall apart in certain usages - its safe to assume it as unused in normal testing |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi All
I'm trying to build in session fixtures into my conftest which provide a layer of safety to ensure that they cannot be run in the wrong environment. However I noticed that pytest come with an option
--noconftestwhich appears to mean a developer could bypass any of those safe guards by not loading the conftest.I'm trying to find if there is anyway to disable this flag for this project, but there doesn't appear to be an obvious way to do this.
Of course I can't put anything in the conftest itself, since its not loaded. The only option I've been able to work out, its to ensure that every module has an autouse session fixture which depends on the one in the conftest, which will cause them to all error out because they can't find the unloaded fixture name.
Is there a way to disable this, or best practices about this?
Thanks
All reactions