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/src/_pytest/logging.py
src/_pytest/logging.py
547
LogCaptureHandler
ref
function
self.report_handler = LogCaptureHandler()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
548
setFormatter
ref
function
self.report_handler.setFormatter(self.formatter)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
551
get_log_level_for_setting
ref
function
self.log_file_level = get_log_level_for_setting(config, "log_file_level")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
552
get_option_ini
ref
function
log_file = get_option_ini(config, "log_file") or os.devnull
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
554
dirname
ref
function
directory = os.path.dirname(os.path.abspath(log_file))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
554
abspath
ref
function
directory = os.path.dirname(os.path.abspath(log_file))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
555
isdir
ref
function
if not os.path.isdir(directory):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
558
_FileHandler
ref
function
self.log_file_handler = _FileHandler(log_file, mode="w", encoding="UTF-8")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
559
get_option_ini
ref
function
log_file_format = get_option_ini(config, "log_file_format", "log_format")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
560
get_option_ini
ref
function
log_file_date_format = get_option_ini(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
564
Formatter
ref
function
log_file_formatter = logging.Formatter(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
567
setFormatter
ref
function
self.log_file_handler.setFormatter(log_file_formatter)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
570
get_log_level_for_setting
ref
function
self.log_cli_level = get_log_level_for_setting(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
573
_log_cli_enabled
ref
function
if self._log_cli_enabled():
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
574
get_plugin
ref
function
terminal_reporter = config.pluginmanager.get_plugin("terminalreporter")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
575
get_plugin
ref
function
capture_manager = config.pluginmanager.get_plugin("capturemanager")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
579
_LiveLoggingStreamHandler
ref
function
] = _LiveLoggingStreamHandler(terminal_reporter, capture_manager)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
581
_LiveLoggingNullHandler
ref
function
self.log_cli_handler = _LiveLoggingNullHandler()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
582
_create_formatter
ref
function
log_cli_formatter = self._create_formatter(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
583
get_option_ini
ref
function
get_option_ini(config, "log_cli_format", "log_format"),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
584
get_option_ini
ref
function
get_option_ini(config, "log_cli_date_format", "log_date_format"),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
585
get_option_ini
ref
function
get_option_ini(config, "log_auto_indent"),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
587
setFormatter
ref
function
self.log_cli_handler.setFormatter(log_cli_formatter)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
589
_create_formatter
def
function
def _create_formatter(self, log_format, log_date_format, auto_indent): # Color option doesn't exist if terminal plugin is disabled. color = getattr(self._config.option, "color", "no") if color != "no" and ColoredLevelFormatter.LEVELNAME_FMT_REGEX.search( log_format ): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
595
ColoredLevelFormatter
ref
function
formatter: logging.Formatter = ColoredLevelFormatter(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
596
create_terminal_writer
ref
function
create_terminal_writer(self._config), log_format, log_date_format
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
599
Formatter
ref
function
formatter = logging.Formatter(log_format, log_date_format)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
601
PercentStyleMultiline
ref
function
formatter._style = PercentStyleMultiline(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
607
set_log_path
def
function
def set_log_path(self, fname: str) -> None: """Set the filename parameter for Logging.FileHandler(). Creates parent directory if it does not exist. .. warning:: This is an experimental API. """ fpath = Path(fname) if not fpath.is_absolute(): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
625
setStream
ref
function
old_stream = self.log_file_handler.setStream(stream)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
628
acquire
ref
function
self.log_file_handler.acquire()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
633
release
ref
function
self.log_file_handler.release()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
638
_log_cli_enabled
def
function
def _log_cli_enabled(self): """Return whether live logging is enabled.""" enabled = self._config.getoption( "--log-cli-level" ) is not None or self._config.getini("log_cli") if not enabled: return _False terminal_reporter = self._config.pluginmanager....
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
640
getoption
ref
function
enabled = self._config.getoption(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
642
getini
ref
function
) is not None or self._config.getini("log_cli")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
646
get_plugin
ref
function
terminal_reporter = self._config.pluginmanager.get_plugin("terminalreporter")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
653
hookimpl
ref
function
@hookimpl(hookwrapper=True, tryfirst=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
654
pytest_sessionstart
def
function
def pytest_sessionstart(self) -> Generator[None, None, None]: self.log_cli_handler.set_when("sessionstart") with catching_logs(self.log_cli_handler, level=self.log_cli_level): with catching_logs(self.log_file_handler, level=self.log_file_level): yield @hookimpl(hook...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
655
set_when
ref
function
self.log_cli_handler.set_when("sessionstart")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
657
catching_logs
ref
function
with catching_logs(self.log_cli_handler, level=self.log_cli_level):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
658
catching_logs
ref
function
with catching_logs(self.log_file_handler, level=self.log_file_level):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
661
hookimpl
ref
function
@hookimpl(hookwrapper=True, tryfirst=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
662
pytest_collection
def
function
def pytest_collection(self) -> Generator[None, None, None]: self.log_cli_handler.set_when("collection") with catching_logs(self.log_cli_handler, level=self.log_cli_level): with catching_logs(self.log_file_handler, level=self.log_file_level): yield @hookimpl(hookwrap...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
663
set_when
ref
function
self.log_cli_handler.set_when("collection")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
665
catching_logs
ref
function
with catching_logs(self.log_cli_handler, level=self.log_cli_level):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
666
catching_logs
ref
function
with catching_logs(self.log_file_handler, level=self.log_file_level):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
669
hookimpl
ref
function
@hookimpl(hookwrapper=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
670
pytest_runtestloop
def
function
def pytest_runtestloop(self, session: Session) -> Generator[None, None, None]: if session.config.option.collectonly: yield return if self._log_cli_enabled() and self._config.getoption("verbose") < 1: # The verbose flag is needed to avoid messy test progress outpu...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
675
_log_cli_enabled
ref
function
if self._log_cli_enabled() and self._config.getoption("verbose") < 1:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
675
getoption
ref
function
if self._log_cli_enabled() and self._config.getoption("verbose") < 1:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
679
catching_logs
ref
function
with catching_logs(self.log_cli_handler, level=self.log_cli_level):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
680
catching_logs
ref
function
with catching_logs(self.log_file_handler, level=self.log_file_level):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
684
pytest_runtest_logstart
def
function
def pytest_runtest_logstart(self) -> None: self.log_cli_handler.reset() self.log_cli_handler.set_when("start") @hookimpl def pytest_runtest_logreport(self) -> None: self.log_cli_handler.set_when("logreport") def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None,...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
685
reset
ref
function
self.log_cli_handler.reset()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
686
set_when
ref
function
self.log_cli_handler.set_when("start")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
689
pytest_runtest_logreport
def
function
def pytest_runtest_logreport(self) -> None: self.log_cli_handler.set_when("logreport") def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None, None, None]: """Implement the internals of the pytest_runtest_xxx() hooks.""" with catching_logs( self.caplog_handler...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
690
set_when
ref
function
self.log_cli_handler.set_when("logreport")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
692
_runtest_for
def
function
def _runtest_for(self, item: nodes.Item, when: str) -> Generator[None, None, None]: """Implement the internals of the pytest_runtest_xxx() hooks.""" with catching_logs( self.caplog_handler, level=self.log_level, ) as caplog_handler, catching_logs( self.rep...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
694
catching_logs
ref
function
with catching_logs(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
697
catching_logs
ref
function
) as caplog_handler, catching_logs(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
701
reset
ref
function
caplog_handler.reset()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
702
reset
ref
function
report_handler.reset()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
709
add_report_section
ref
function
item.add_report_section(when, "log", log)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
711
hookimpl
ref
function
@hookimpl(hookwrapper=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
712
pytest_runtest_setup
def
function
def pytest_runtest_setup(self, item: nodes.Item) -> Generator[None, None, None]: self.log_cli_handler.set_when("setup") empty: Dict[str, List[logging.LogRecord]] = {} item.stash[caplog_records_key] = empty yield from self._runtest_for(item, "setup") @hookimpl(hookwrapper=_True)...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
713
set_when
ref
function
self.log_cli_handler.set_when("setup")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
717
_runtest_for
ref
function
yield from self._runtest_for(item, "setup")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
719
hookimpl
ref
function
@hookimpl(hookwrapper=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
720
pytest_runtest_call
def
function
def pytest_runtest_call(self, item: nodes.Item) -> Generator[None, None, None]: self.log_cli_handler.set_when("call") yield from self._runtest_for(item, "call") @hookimpl(hookwrapper=_True) def pytest_runtest_teardown(self, item: nodes.Item) -> Generator[None, None, None]: self.log...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
721
set_when
ref
function
self.log_cli_handler.set_when("call")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
723
_runtest_for
ref
function
yield from self._runtest_for(item, "call")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
725
hookimpl
ref
function
@hookimpl(hookwrapper=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
726
pytest_runtest_teardown
def
function
def pytest_runtest_teardown(self, item: nodes.Item) -> Generator[None, None, None]: self.log_cli_handler.set_when("teardown") yield from self._runtest_for(item, "teardown") del item.stash[caplog_records_key] del item.stash[caplog_handler_key] @hookimpl def pytest_runtest_lo...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
727
set_when
ref
function
self.log_cli_handler.set_when("teardown")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
729
_runtest_for
ref
function
yield from self._runtest_for(item, "teardown")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
734
pytest_runtest_logfinish
def
function
def pytest_runtest_logfinish(self) -> None: self.log_cli_handler.set_when("finish") @hookimpl(hookwrapper=_True, tryfirst=_True) def pytest_sessionfinish(self) -> Generator[None, None, None]: self.log_cli_handler.set_when("sessionfinish") with catching_logs(self.log_cli_handler, le...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
735
set_when
ref
function
self.log_cli_handler.set_when("finish")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
737
hookimpl
ref
function
@hookimpl(hookwrapper=True, tryfirst=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
738
pytest_sessionfinish
def
function
def pytest_sessionfinish(self) -> Generator[None, None, None]: self.log_cli_handler.set_when("sessionfinish") with catching_logs(self.log_cli_handler, level=self.log_cli_level): with catching_logs(self.log_file_handler, level=self.log_file_level): yield @hookimpl ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
739
set_when
ref
function
self.log_cli_handler.set_when("sessionfinish")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
741
catching_logs
ref
function
with catching_logs(self.log_cli_handler, level=self.log_cli_level):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
742
catching_logs
ref
function
with catching_logs(self.log_file_handler, level=self.log_file_level):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
746
pytest_unconfigure
def
function
def pytest_unconfigure(self) -> None: # Close the FileHandler explicitly. # (logging.shutdown might have lost the weakref?!) self.log_file_handler.close()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
752
_FileHandler
def
class
handleError
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
755
handleError
def
function
def handleError(self, record: logging.LogRecord) -> None: if logging.raiseExceptions: # Fail the test if the log message is bad (emit failed). # The default behavior of logging is to print "Logging error" # to stderr with the call stack and some extra details. ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
760
_LiveLoggingStreamHandler
def
class
__init__ reset set_when emit handleError
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
780
reset
ref
function
self.reset()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
781
set_when
ref
function
self.set_when(None)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
784
reset
def
function
def reset(self) -> None: self.records = [] self.stream = StringIO() def handleError(self, record: logging.LogRecord) -> None: if logging.raiseExceptions: # Fail the test if the log message is bad (emit failed). # The default behavior of logging is to print "Loggi...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
788
set_when
def
function
def set_when(self, when: Optional[str]) -> None: """Prepare for the given test phase (setup/call/teardown).""" self._when = when self._section_name_shown = _False if when == "start": self._test_outcome_written = _False def emit(self, record: logging.LogRecord) -> Non...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
795
emit
def
function
def emit(self, record: logging.LogRecord) -> None: """Keep the log records in a list in addition to the log text.""" self.records.append(record) super().emit(record) def reset(self) -> None: self.records = [] self.stream = StringIO() def handleError(self, record: lo...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
797
global_and_fixture_disabled
ref
function
self.capture_manager.global_and_fixture_disabled()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
799
nullcontext
ref
function
else nullcontext()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
810
section
ref
function
self.stream.section("live log " + self._when, sep="-", bold=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
812
emit
ref
function
super().emit(record)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
814
handleError
def
function
def handleError(self, record: logging.LogRecord) -> None: if logging.raiseExceptions: # Fail the test if the log message is bad (emit failed). # The default behavior of logging is to print "Logging error" # to stderr with the call stack and some extra details. ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
819
_LiveLoggingNullHandler
def
class
reset set_when handleError
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
822
reset
def
function
def reset(self) -> None: self.records = [] self.stream = StringIO() def handleError(self, record: logging.LogRecord) -> None: if logging.raiseExceptions: # Fail the test if the log message is bad (emit failed). # The default behavior of logging is to print "Loggi...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
825
set_when
def
function
def set_when(self, when: str) -> None: pass def handleError(self, record: logging.LogRecord) -> None: # Handled by LogCaptureHandler. pass
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/logging.py
src/_pytest/logging.py
828
handleError
def
function
def handleError(self, record: logging.LogRecord) -> None: if logging.raiseExceptions: # Fail the test if the log message is bad (emit failed). # The default behavior of logging is to print "Logging error" # to stderr with the call stack and some extra details. ...