The thread-local context can be cleared, causing any previously bound variables to not be included in merge_threadlocal's result.
(self)
| 342 | assert {"a": 1, "b": 2} == merge_threadlocal(None, None, {"b": 2}) |
| 343 | |
| 344 | def test_clear(self): |
| 345 | """ |
| 346 | The thread-local context can be cleared, causing any previously bound |
| 347 | variables to not be included in merge_threadlocal's result. |
| 348 | """ |
| 349 | with pytest.deprecated_call(): |
| 350 | bind_threadlocal(a=1) |
| 351 | |
| 352 | with pytest.deprecated_call(): |
| 353 | clear_threadlocal() |
| 354 | |
| 355 | with pytest.deprecated_call(): |
| 356 | assert {"b": 2} == merge_threadlocal(None, None, {"b": 2}) |
| 357 | |
| 358 | def test_merge_works_without_bind(self): |
| 359 | """ |
nothing calls this directly
no test coverage detected