MCPcopy Create free account
hub / github.com/pytest-dev/pytest / messages

Method messages

src/_pytest/logging.py:419–435  ·  view source on GitHub ↗

A list of format-interpolated log messages. Unlike 'records', which contains the format string and parameters for interpolation, log messages in this list are all interpolated. Unlike 'text', which contains the output from the handler, log messages in this list are

(self)

Source from the content-addressed store, hash-verified

417
418 @property
419 def messages(self) -> List[str]:
420 """A list of format-interpolated log messages.
421
422 Unlike 'records', which contains the format string and parameters for
423 interpolation, log messages in this list are all interpolated.
424
425 Unlike 'text', which contains the output from the handler, log
426 messages in this list are unadorned with levels, timestamps, etc,
427 making exact comparisons more reliable.
428
429 Note that traceback or stack info (from :func:`logging.exception` or
430 the `exc_info` or `stack_info` arguments to the logging functions) is
431 not included, as this is added by the formatter in the handler.
432
433 .. versionadded:: 3.7
434 """
435 return [r.getMessage() for r in self.records]
436
437 def clear(self) -> None:
438 """Reset the list of log records and the captured log text."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected