-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributortype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification
Description
What's the problem this feature will solve?
The documentation for caplog.set_level()
says
Set the level of a logger for the duration of a test.
This does not make it clear that it's setting the threshold level for capturing logging.
Describe the solution you'd like
The Python logging documentation makes this clear for logging.setLevel()
:
Sets the threshold for this logger to level. Logging messages which are less severe than level will be ignored; ...
caplog.set_level()
ought to do the same.
Additional context
The only reason I know it's a threshold is because I tried running pytest -rA
with different levels set in caplog and the output contained messages at that level and above
Metadata
Metadata
Assignees
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributortype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification