Ensure BoundLogger is immutable by default.
(self)
| 38 | ) == repr(bl) |
| 39 | |
| 40 | def test_binds_independently(self): |
| 41 | """ |
| 42 | Ensure BoundLogger is immutable by default. |
| 43 | """ |
| 44 | b = build_bl(processors=[KeyValueRenderer(sort_keys=True)]) |
| 45 | b = b.bind(x=42, y=23) |
| 46 | b1 = b.bind(foo="bar") |
| 47 | b2 = b.bind(foo="qux") |
| 48 | |
| 49 | assert b._context != b1._context != b2._context |
| 50 | |
| 51 | def test_new_clears_state(self): |
| 52 | """ |
nothing calls this directly
no test coverage detected