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

Function test_collection_live_logging

testing/logging/test_reporting.py:870–882  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

868
869
870def test_collection_live_logging(pytester: Pytester) -> None:
871 pytester.makepyfile(
872 """
873 import logging
874
875 logging.getLogger().info("Normal message")
876 """
877 )
878
879 result = pytester.runpytest("--log-cli-level=INFO")
880 result.stdout.fnmatch_lines(
881 ["*--- live log collection ---*", "*Normal message*", "collected 0 items"]
882 )
883
884
885@pytest.mark.parametrize("verbose", ["", "-q", "-qq"])

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected