-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Fine grain output verbosity #11387
Copy link
Copy link
Open
Labels
topic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errorstype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
Metadata
Metadata
Assignees
Labels
topic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errorstype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
What's the problem this feature will solve?
There are multiple open issues that are requesting more control over the output displayed by
pytest.--verboseturns everything up, but it would be nice to be able to just increase or decrease the verbosity for specific aspects of the output.Open issues that I've found that fit into this problem space (there may be others):
-vmode, still display full value in-vv#5285Describe the solution you'd like
I think a way that could resolve all of these is to add an abstraction layer on top
config.option.verbose. Rough pseudo-code example:For general cases, the
verboseattribute could be used. For special cases, an output type name could be passed in retrieve the more fine grained setting. If the specific config is not set, it will default to the normal verbose level. Once this is in place, it would be easier to add more cases in the future if they come up.Implementation
verbosity_{OUTPUT_TYPE}seems reasonable to me.