bound_threadlocal binds and unbinds even when nested
(self)
| 467 | assert {"y": "foo"} == get_threadlocal() |
| 468 | |
| 469 | def test_nesting_works(self): |
| 470 | """ |
| 471 | bound_threadlocal binds and unbinds even when nested |
| 472 | """ |
| 473 | with pytest.deprecated_call(): |
| 474 | with bound_threadlocal(l1=1): |
| 475 | assert {"l1": 1} == get_threadlocal() |
| 476 | |
| 477 | with bound_threadlocal(l2=2): |
| 478 | assert {"l1": 1, "l2": 2} == get_threadlocal() |
| 479 | |
| 480 | assert {"l1": 1} == get_threadlocal() |
| 481 | |
| 482 | assert {} == get_threadlocal() |
| 483 | |
| 484 | def test_as_decorator(self): |
| 485 | """ |
nothing calls this directly
no test coverage detected