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

Method test_cleanup

tests/test_threadlocal.py:432–440  ·  view source on GitHub ↗

Bindings are cleaned up

(self)

Source from the content-addressed store, hash-verified

430
431class TestBoundThreadlocal:
432 def test_cleanup(self):
433 """
434 Bindings are cleaned up
435 """
436 with pytest.deprecated_call(), bound_threadlocal(x=42, y="foo"):
437 assert {"x": 42, "y": "foo"} == get_threadlocal()
438
439 with pytest.deprecated_call():
440 assert {} == get_threadlocal()
441
442 def test_cleanup_conflict(self):
443 """

Callers

nothing calls this directly

Calls 2

bound_threadlocalFunction · 0.90
get_threadlocalFunction · 0.90

Tested by

no test coverage detected