All calls to all names are captured.
(self)
| 209 | assert "<CapturingLogger with 2 call(s)>" == repr(cl) |
| 210 | |
| 211 | def test_captures(self): |
| 212 | """ |
| 213 | All calls to all names are captured. |
| 214 | """ |
| 215 | cl = CapturingLogger() |
| 216 | |
| 217 | cl.info("hi", val=42) |
| 218 | cl.trololo("yolo", foo={"bar": "baz"}) |
| 219 | |
| 220 | assert [ |
| 221 | CapturedCall(method_name="info", args=("hi",), kwargs={"val": 42}), |
| 222 | CapturedCall( |
| 223 | method_name="trololo", |
| 224 | args=("yolo",), |
| 225 | kwargs={"foo": {"bar": "baz"}}, |
| 226 | ), |
| 227 | ] == cl.calls |
nothing calls this directly
no test coverage detected