Returns a copy of the threadlocal context merged with the logger's context.
(self)
| 415 | assert {} == get_threadlocal() |
| 416 | |
| 417 | def test_get_merged(self): |
| 418 | """ |
| 419 | Returns a copy of the threadlocal context merged with the logger's |
| 420 | context. |
| 421 | """ |
| 422 | with pytest.deprecated_call(): |
| 423 | bind_threadlocal(x=1) |
| 424 | |
| 425 | log = structlog.get_logger().bind(y=2) |
| 426 | |
| 427 | with pytest.deprecated_call(): |
| 428 | assert {"x": 1, "y": 2} == get_merged_threadlocal(log) |
| 429 | |
| 430 | |
| 431 | class TestBoundThreadlocal: |
nothing calls this directly
no test coverage detected