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

Method test_binds_independently

tests/test_base.py:40–49  ·  view source on GitHub ↗

Ensure BoundLogger is immutable by default.

(self)

Source from the content-addressed store, hash-verified

38 ) == repr(bl)
39
40 def test_binds_independently(self):
41 """
42 Ensure BoundLogger is immutable by default.
43 """
44 b = build_bl(processors=[KeyValueRenderer(sort_keys=True)])
45 b = b.bind(x=42, y=23)
46 b1 = b.bind(foo="bar")
47 b2 = b.bind(foo="qux")
48
49 assert b._context != b1._context != b2._context
50
51 def test_new_clears_state(self):
52 """

Callers

nothing calls this directly

Calls 3

KeyValueRendererClass · 0.90
build_blFunction · 0.70
bindMethod · 0.45

Tested by

no test coverage detected