MCPcopy Index your code
hub / github.com/RustPython/RustPython / _caplog

Function _caplog

Lib/test/test_support.py:44–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42
43@contextlib.contextmanager
44def _caplog():
45 handler = LogCaptureHandler()
46 root_logger = logging.getLogger()
47 root_logger.addHandler(handler)
48 try:
49 yield handler
50 finally:
51 root_logger.removeHandler(handler)
52
53
54class TestSupport(unittest.TestCase):

Calls 4

LogCaptureHandlerClass · 0.85
getLoggerMethod · 0.80
addHandlerMethod · 0.80
removeHandlerMethod · 0.80

Tested by

no test coverage detected