MCPcopy Create free account
hub / github.com/Delgan/loguru / test_remove_interception

Function test_remove_interception

tests/test_interception.py:70–80  ·  view source on GitHub ↗
(writer)

Source from the content-addressed store, hash-verified

68
69
70def test_remove_interception(writer):
71 h = InterceptHandler()
72
73 with make_logging_logger("foobar", h) as logging_logger:
74 logger.add(writer, format="{message}")
75 logging_logger.debug("1")
76 logging_logger.removeHandler(h)
77 logging_logger.debug("2")
78
79 result = writer.read()
80 assert result == "1\n"
81
82
83def test_intercept_too_low(writer):

Callers

nothing calls this directly

Calls 5

InterceptHandlerClass · 0.85
make_logging_loggerFunction · 0.85
addMethod · 0.80
debugMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected