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

Method test_multiple_binds

tests/test_threadlocal.py:366–378  ·  view source on GitHub ↗

Multiple calls to bind_threadlocal accumulate values instead of replacing them.

(self)

Source from the content-addressed store, hash-verified

364 assert {"b": 2} == merge_threadlocal(None, None, {"b": 2})
365
366 def test_multiple_binds(self):
367 """
368 Multiple calls to bind_threadlocal accumulate values instead of
369 replacing them.
370 """
371 with pytest.deprecated_call():
372 bind_threadlocal(a=1, b=2)
373 bind_threadlocal(c=3)
374
375 with pytest.deprecated_call():
376 assert {"a": 1, "b": 2, "c": 3} == merge_threadlocal(
377 None, None, {"b": 2}
378 )
379
380 def test_unbind_threadlocal(self):
381 """

Callers

nothing calls this directly

Calls 2

bind_threadlocalFunction · 0.90
merge_threadlocalFunction · 0.90

Tested by

no test coverage detected