-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
RFE: add --disesct-extensions option #8993
Comments
the desired workflow/use-case is not clear, please provide some examples that help to understand what you mean |
Use case: build enviroment with large number of installed pytest extencions in which is hard to identify which one extension is reportimng exact error/warning. |
closing as OP refusing to describe the use-case in sufficient detail |
I disagree, if I understand the request correctly, this probably should be even implemented by an external tool, not as a pytest plugin, as pytest itself might break in the presence of a bad plugin. |
I understand the context of the request because I read ESSS/pytest-regressions#64, where running pytest with many plugins installed gives this error:
And is not clear which plugin is the culprit, I had to look at the source code of We might consider at least show the full qualified name of the offending class in that message? So users would see |
My intention was to provide such level of diagnostics as OOTB/core part of the pytest but available only on demand when pytest would be started with |
Exactly. |
Generally what IMO is missing is in pytest output are details about per extension diagnostics. Simple at the moment when I'm running pytest in env with many extensions it is really hard to figure out is exact error/warning generated by core pytest or by some exact extensions. In my rpm build infrastructure I can send set of requests to perform scratch/control/test builds with only build logs preservation, and additionally with modified exact macro and additional set of BuildRequires not specified in rpm spec file (all without touching any cfg files .. just paramsa in command line). I've been thinking about such mass test build quite long time (way before I've started packaging python modules). When I found pytest as most sophisticated python testing framework I've started using pytest everywhere when it is only possible (even if module maintainers recommends other method of testing). I think that outcome of such mass tests could be quite interesting for python community and may automatically expose many issues. |
I understand and sympathize with the sentiment, but this is not something which is simple and perhaps even possible to implement in pytest reliably, that's why I suggest an external tool. |
That is OK. This is still only as idea :) |
|
"Nobody expects the Spanish Inquisition " .. in |
But you don't want the fixtures, you want the plugins IIUC. |
pytest can handle
-no:foo
option to disable loadingfoo
pytest extension.Idea behind
--dissect-extensions
option is to automatically run additional passes with dissected set of availablepytest
extensions if error or warning will occur and report at the end which one of the errors or warnings have been reported when exact pytest extension is loaded.I think that something like this would dramatically improve reporting some errors because it would be easier to point on exact extension which shows some warnings or errors or report errors against some pytest extensions.
I think that code handling such option should be core part of the
pytest
(not as optional extension)The text was updated successfully, but these errors were encountered: