MCPcopy
hub / github.com/Delgan/loguru / test_file_handler

Function test_file_handler

tests/test_standard_handler.py:20–27  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

18
19
20def test_file_handler(tmp_path):
21 file = tmp_path / "test.log"
22 logger.add(FileHandler(str(file)), format="{message} {level.name}")
23 logger.info("test")
24 logger.remove()
25 logger.warning("nope")
26
27 assert file.read_text() == "test INFO\n"
28
29
30def test_null_handler(capsys):

Callers

nothing calls this directly

Calls 4

addMethod · 0.80
infoMethod · 0.80
removeMethod · 0.80
warningMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…