fname stringlengths 63 176 | rel_fname stringclasses 706
values | line int64 -1 4.5k | name stringlengths 1 81 | kind stringclasses 2
values | category stringclasses 2
values | info stringlengths 0 77.9k ⌀ |
|---|---|---|---|---|---|---|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 11 | runpytest | ref | function | result = pytester.runpytest("--fixtures")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 12 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*caplog*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 15 | test_change_level | def | function | def test_change_level(caplog):
caplog.set_level(logging.INFO)
logger.debug("handler DEBUG level")
logger.info("handler INFO level")
caplog.set_level(logging.CRITICAL, logger=sublogger.name)
sublogger.warning("logger WARNING level")
sublogger.critical("logger CRITICAL level")
assert "DEBUG"... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 16 | set_level | ref | function | caplog.set_level(logging.INFO)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 17 | debug | ref | function | logger.debug("handler DEBUG level")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 18 | info | ref | function | logger.info("handler INFO level")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 20 | set_level | ref | function | caplog.set_level(logging.CRITICAL, logger=sublogger.name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 21 | warning | ref | function | sublogger.warning("logger WARNING level")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 22 | critical | ref | function | sublogger.critical("logger CRITICAL level")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 30 | test_change_level_undo | def | function | def test_change_level_undo(pytester: Pytester) -> None:
"""Ensure that 'set_level' is undone after the end of the test.
Tests the logging output themselves (affacted both by logger and handler levels).
"""
pytester.makepyfile(
"""
import logging
def test1(caplog):
c... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 35 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 51 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 52 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*log from test1*", "*2 failed in *"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 53 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*log from test2*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 56 | test_change_level_undos_handler_level | def | function | def test_change_level_undos_handler_level(pytester: Pytester) -> None:
"""Ensure that 'set_level' is undone after the end of the test (handler).
Issue #7569. Tests the handler level specifically.
"""
pytester.makepyfile(
"""
import logging
def test1(caplog):
assert ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 61 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 80 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 81 | assert_outcomes | ref | function | result.assert_outcomes(passed=3)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 84 | test_with_statement | def | function | def test_with_statement(caplog):
with caplog.at_level(logging.INFO):
logger.debug("handler DEBUG level")
logger.info("handler INFO level")
with caplog.at_level(logging.CRITICAL, logger=sublogger.name):
sublogger.warning("logger WARNING level")
sublogger.critical("log... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 85 | at_level | ref | function | with caplog.at_level(logging.INFO):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 86 | debug | ref | function | logger.debug("handler DEBUG level")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 87 | info | ref | function | logger.info("handler INFO level")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 89 | at_level | ref | function | with caplog.at_level(logging.CRITICAL, logger=sublogger.name):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 90 | warning | ref | function | sublogger.warning("logger WARNING level")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 91 | critical | ref | function | sublogger.critical("logger CRITICAL level")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 99 | test_log_access | def | function | def test_log_access(caplog):
caplog.set_level(logging.INFO)
logger.info("boo %s", "arg")
assert caplog.records[0].levelname == "INFO"
assert caplog.records[0].msg == "boo %s"
assert "boo arg" in caplog.text
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 100 | set_level | ref | function | caplog.set_level(logging.INFO)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 101 | info | ref | function | logger.info("boo %s", "arg")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 107 | test_messages | def | function | def test_messages(caplog):
caplog.set_level(logging.INFO)
logger.info("boo %s", "arg")
logger.info("bar %s\nbaz %s", "arg1", "arg2")
assert "boo arg" == caplog.messages[0]
assert "bar arg1\nbaz arg2" == caplog.messages[1]
assert caplog.text.count("\n") > len(caplog.messages)
assert len(caplo... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 108 | set_level | ref | function | caplog.set_level(logging.INFO)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 109 | info | ref | function | logger.info("boo %s", "arg")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 110 | info | ref | function | logger.info("bar %s\nbaz %s", "arg1", "arg2")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 119 | exception | ref | function | logger.exception("oops")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 128 | test_record_tuples | def | function | def test_record_tuples(caplog):
caplog.set_level(logging.INFO)
logger.info("boo %s", "arg")
assert caplog.record_tuples == [(__name__, logging.INFO, "boo arg")]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 129 | set_level | ref | function | caplog.set_level(logging.INFO)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 130 | info | ref | function | logger.info("boo %s", "arg")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 135 | test_unicode | def | function | def test_unicode(caplog):
caplog.set_level(logging.INFO)
logger.info("bū")
assert caplog.records[0].levelname == "INFO"
assert caplog.records[0].msg == "bū"
assert "bū" in caplog.text
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 136 | set_level | ref | function | caplog.set_level(logging.INFO)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 137 | info | ref | function | logger.info("bū")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 143 | test_clear | def | function | def test_clear(caplog):
caplog.set_level(logging.INFO)
logger.info("bū")
assert len(caplog.records)
assert caplog.text
caplog.clear()
assert not len(caplog.records)
assert not caplog.text
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 144 | set_level | ref | function | caplog.set_level(logging.INFO)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 145 | info | ref | function | logger.info("bū")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 154 | logging_during_setup_and_teardown | def | function | def logging_during_setup_and_teardown(caplog):
caplog.set_level("INFO")
logger.info("a_setup_log")
yield
logger.info("a_teardown_log")
assert [x.message for x in caplog.get_records("teardown")] == ["a_teardown_log"]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 155 | set_level | ref | function | caplog.set_level("INFO")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 156 | info | ref | function | logger.info("a_setup_log")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 158 | info | ref | function | logger.info("a_teardown_log")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 159 | get_records | ref | function | assert [x.message for x in caplog.get_records("teardown")] == ["a_teardown_log"]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 162 | test_caplog_captures_for_all_stages | def | function | def test_caplog_captures_for_all_stages(caplog, logging_during_setup_and_teardown):
assert not caplog.records
assert not caplog.get_records("call")
logger.info("a_call_log")
assert [x.message for x in caplog.get_records("call")] == ["a_call_log"]
assert [x.message for x in caplog.get_records("setup... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 164 | get_records | ref | function | assert not caplog.get_records("call")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 165 | info | ref | function | logger.info("a_call_log")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 166 | get_records | ref | function | assert [x.message for x in caplog.get_records("call")] == ["a_call_log"]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 168 | get_records | ref | function | assert [x.message for x in caplog.get_records("setup")] == ["a_setup_log"]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 174 | test_ini_controls_global_log_level | def | function | def test_ini_controls_global_log_level(pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
import logging
def test_log_level_override(request, caplog):
plugin = request.config.pluginmanager.getplugin('logging-plugin')
assert plugin.log_level ==... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 175 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 189 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 196 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 201 | test_caplog_can_override_global_log_level | def | function | def test_caplog_can_override_global_log_level(pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
import logging
def test_log_level_override(request, caplog):
logger = logging.getLogger('catchlog')
plugin = request.config.pluginmanager.getplugi... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 202 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 229 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 236 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 240 | test_caplog_captures_despite_exception | def | function | def test_caplog_captures_despite_exception(pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
import logging
def test_log_level_override(request, caplog):
logger = logging.getLogger('catchlog')
plugin = request.config.pluginmanager.getplugin('... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 241 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 257 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 264 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 265 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*ERROR message will be shown*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 266 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*DEBUG message won't be shown*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 270 | test_log_report_captures_according_to_config_option_upon_failure | def | function | def test_log_report_captures_according_to_config_option_upon_failure(
pytester: Pytester,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 278 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 303 | runpytest | ref | function | result = pytester.runpytest("--log-level=INFO")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 304 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*Exception: caplog failed to capture DEBUG*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 305 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*DEBUG log message*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_fixture.py | testing/logging/test_fixture.py | 306 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 7 | test_coloredlogformatter | def | function | def test_coloredlogformatter() -> None:
logfmt = "%(filename)-25s %(lineno)4d %(levelname)-8s %(message)s"
record = logging.LogRecord(
name="dummy",
level=logging.INFO,
pathname="dummypath",
lineno=10,
msg="Test Message",
args=(),
exc_info=None,
)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 10 | LogRecord | ref | function | record = logging.LogRecord(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 20 | TerminalWriter | ref | function | tw = TerminalWriter()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 22 | ColoredLevelFormatter | ref | function | formatter = ColoredLevelFormatter(tw, logfmt)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 29 | ColoredLevelFormatter | ref | function | formatter = ColoredLevelFormatter(tw, logfmt)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 34 | test_coloredlogformatter_with_width_precision | def | function | def test_coloredlogformatter_with_width_precision() -> None:
logfmt = "%(filename)-25s %(lineno)4d %(levelname)-8.8s %(message)s"
record = logging.LogRecord(
name="dummy",
level=logging.INFO,
pathname="dummypath",
lineno=10,
msg="Test Message",
args=(),
e... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 37 | LogRecord | ref | function | record = logging.LogRecord(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 47 | TerminalWriter | ref | function | tw = TerminalWriter()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 49 | ColoredLevelFormatter | ref | function | formatter = ColoredLevelFormatter(tw, logfmt)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 56 | ColoredLevelFormatter | ref | function | formatter = ColoredLevelFormatter(tw, logfmt)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 61 | test_multiline_message | def | function | def test_multiline_message() -> None:
from _pytest.logging import PercentStyleMultiline
logfmt = "%(filename)-25s %(lineno)4d %(levelname)-8s %(message)s"
record: Any = logging.LogRecord(
name="dummy",
level=logging.INFO,
pathname="dummypath",
lineno=10,
msg="Test M... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 66 | LogRecord | ref | function | record: Any = logging.LogRecord(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 76 | getMessage | ref | function | record.message = record.getMessage()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 78 | PercentStyleMultiline | ref | function | ai_on_style = PercentStyleMultiline(logfmt, True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 85 | PercentStyleMultiline | ref | function | ai_off_style = PercentStyleMultiline(logfmt, False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 91 | PercentStyleMultiline | ref | function | ai_none_style = PercentStyleMultiline(logfmt, None)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 150 | test_colored_short_level | def | function | def test_colored_short_level() -> None:
logfmt = "%(levelname).1s %(message)s"
record = logging.LogRecord(
name="dummy",
level=logging.INFO,
pathname="dummypath",
lineno=10,
msg="Test Message",
args=(),
exc_info=None,
)
class ColorConfig:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 153 | LogRecord | ref | function | record = logging.LogRecord(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 163 | ColorConfig | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 164 | option | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 167 | TerminalWriter | ref | function | tw = TerminalWriter()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_formatter.py | testing/logging/test_formatter.py | 169 | ColoredLevelFormatter | ref | function | formatter = ColoredLevelFormatter(tw, logfmt)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_reporting.py | testing/logging/test_reporting.py | 13 | test_nothing_logged | def | function | def test_nothing_logged(pytester: Pytester) -> None:
pytester.makepyfile(
"""
import sys
def test_foo():
sys.stdout.write('text going to stdout')
sys.stderr.write('text going to stderr')
assert _False
"""
)
result = pytester.runpytest()
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_reporting.py | testing/logging/test_reporting.py | 14 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_reporting.py | testing/logging/test_reporting.py | 24 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_reporting.py | testing/logging/test_reporting.py | 26 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*- Captured stdout call -*", "text going to stdout"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_reporting.py | testing/logging/test_reporting.py | 27 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*- Captured stderr call -*", "text going to stderr"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/logging/test_reporting.py | testing/logging/test_reporting.py | 28 | raises | ref | function | with pytest.raises(pytest.fail.Exception):
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.