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

Function test_dict_unpacking

tests/test_configure.py:69–82  ·  view source on GitHub ↗
(writer)

Source from the content-addressed store, hash-verified

67
68
69def test_dict_unpacking(writer):
70 config = {
71 "handlers": [{"sink": writer, "format": "{level.no} - {extra[x]} {extra[z]} - {message}"}],
72 "levels": [{"name": "test", "no": 30}],
73 "extra": {"x": 1, "y": 2, "z": 3},
74 }
75
76 logger.debug("NOPE")
77
78 logger.configure(**config)
79
80 logger.log("test", "Yes!")
81
82 assert writer.read() == "30 - 1 3 - Yes!\n"
83
84
85def test_returned_ids(capsys):

Callers

nothing calls this directly

Calls 4

debugMethod · 0.80
configureMethod · 0.80
logMethod · 0.80
readMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…