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

Method test_comparison

tests/test_base.py:68–77  ·  view source on GitHub ↗

Two bound loggers are equal if their context is equal.

(self)

Source from the content-addressed store, hash-verified

66 assert {} == dict(get_context(b))
67
68 def test_comparison(self):
69 """
70 Two bound loggers are equal if their context is equal.
71 """
72 b = build_bl()
73
74 assert b == b.bind()
75 assert b is not b.bind()
76 assert b != b.bind(x=5)
77 assert b != "test"
78
79 def test_bind_keeps_class(self):
80 """

Callers

nothing calls this directly

Calls 2

build_blFunction · 0.70
bindMethod · 0.45

Tested by

no test coverage detected