Calling new() on a logger clears the context.
(self)
| 49 | assert b._context != b1._context != b2._context |
| 50 | |
| 51 | def test_new_clears_state(self): |
| 52 | """ |
| 53 | Calling new() on a logger clears the context. |
| 54 | """ |
| 55 | b = build_bl() |
| 56 | b = b.bind(x=42) |
| 57 | |
| 58 | assert 42 == get_context(b)["x"] |
| 59 | |
| 60 | b = b.bind() |
| 61 | |
| 62 | assert 42 == get_context(b)["x"] |
| 63 | |
| 64 | b = b.new() |
| 65 | |
| 66 | assert {} == dict(get_context(b)) |
| 67 | |
| 68 | def test_comparison(self): |
| 69 | """ |
nothing calls this directly
no test coverage detected