-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
plugin: loggingrelated to the logging builtin pluginrelated to the logging builtin plugintype: bugproblem that needs to be addressedproblem that needs to be addressedtype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification
Description
As seen here: https://docs.pytest.org/en/latest/builtin.html
caplog
Access and control log capturing.
Captured logs are available through the following methods::
* caplog.text() -> string containing formatted log output
* caplog.records() -> list of logging.LogRecord instances
* caplog.record_tuples() -> list of (logger_name, level, message) tuples
* caplog.clear() -> clear captured records and formatted log output string
However, text
, records
and record_tuples
are properties. Using them as described results in an exception:
TypeError: 'list' object is not callable
Metadata
Metadata
Assignees
Labels
plugin: loggingrelated to the logging builtin pluginrelated to the logging builtin plugintype: bugproblem that needs to be addressedproblem that needs to be addressedtype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification