__getattr__() gets called only once per logger method.
(self)
| 23 | |
| 24 | class TestGenericBoundLogger: |
| 25 | def test_caches(self): |
| 26 | """ |
| 27 | __getattr__() gets called only once per logger method. |
| 28 | """ |
| 29 | b = BoundLogger( |
| 30 | ReturnLogger(), |
| 31 | _CONFIG.default_processors, |
| 32 | _CONFIG.default_context_class(), |
| 33 | ) |
| 34 | |
| 35 | assert "msg" not in b.__dict__ |
| 36 | |
| 37 | b.msg("foo") |
| 38 | |
| 39 | assert "msg" in b.__dict__ |
| 40 | |
| 41 | @pytest.mark.parametrize("proto", range(3, pickle.HIGHEST_PROTOCOL + 1)) |
| 42 | @time_machine.travel("2023-05-22 17:00", tick=False) |
nothing calls this directly
no test coverage detected