tmp_bind does not modify the thread-local state.
(self, log)
| 76 | |
| 77 | class TestTmpBind: |
| 78 | def test_bind(self, log): |
| 79 | """ |
| 80 | tmp_bind does not modify the thread-local state. |
| 81 | """ |
| 82 | log = log.bind(y=23) |
| 83 | with pytest.deprecated_call(), tmp_bind(log, x=42, y="foo") as tmp_log: |
| 84 | assert ( |
| 85 | {"y": "foo", "x": 42} |
| 86 | == tmp_log._context._dict |
| 87 | == log._context._dict |
| 88 | ) |
| 89 | assert {"y": 23} == log._context._dict |
| 90 | |
| 91 | def test_bind_exc(self, log): |
| 92 | """ |