A logger from as_mutable is independent from thread local state.
(self, log)
| 128 | |
| 129 | class TestAsImmutable: |
| 130 | def test_does_not_affect_global(self, log): |
| 131 | """ |
| 132 | A logger from as_mutable is independent from thread local state. |
| 133 | """ |
| 134 | log = log.new(x=42) |
| 135 | with pytest.deprecated_call(): |
| 136 | il = as_immutable(log) |
| 137 | |
| 138 | assert isinstance(il._context, dict) |
| 139 | |
| 140 | il = il.bind(y=23) |
| 141 | |
| 142 | assert {"x": 42, "y": 23} == il._context |
| 143 | assert {"x": 42} == log._context._dict |
| 144 | |
| 145 | def test_converts_proxy(self, log): |
| 146 | """ |
nothing calls this directly
no test coverage detected