MCPcopy Create free account
hub / github.com/hynek/structlog / test_sort_keys

Method test_sort_keys

tests/processors/test_renderers.py:37–43  ·  view source on GitHub ↗

Keys are sorted if sort_keys is set.

(self, event_dict)

Source from the content-addressed store, hash-verified

35
36class TestKeyValueRenderer:
37 def test_sort_keys(self, event_dict):
38 """
39 Keys are sorted if sort_keys is set.
40 """
41 rv = KeyValueRenderer(sort_keys=True)(None, None, event_dict)
42
43 assert r"a=<A(\o/)> b=[3, 4] x=7 y='test' z=(1, 2)" == rv
44
45 def test_order_complete(self, event_dict):
46 """

Callers

nothing calls this directly

Calls 1

KeyValueRendererClass · 0.90

Tested by

no test coverage detected