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

Method test_bind_and_merge

tests/test_threadlocal.py:333–342  ·  view source on GitHub ↗

Binding a variable causes it to be included in the result of merge_threadlocal.

(self)

Source from the content-addressed store, hash-verified

331 assert merge_threadlocal_context is merge_threadlocal
332
333 def test_bind_and_merge(self):
334 """
335 Binding a variable causes it to be included in the result of
336 merge_threadlocal.
337 """
338 with pytest.deprecated_call():
339 bind_threadlocal(a=1)
340
341 with pytest.deprecated_call():
342 assert {"a": 1, "b": 2} == merge_threadlocal(None, None, {"b": 2})
343
344 def test_clear(self):
345 """

Callers

nothing calls this directly

Calls 2

bind_threadlocalFunction · 0.90
merge_threadlocalFunction · 0.90

Tested by

no test coverage detected