(self, entries: Sequence[Tuple[str, str]])
| 278 | return [call for call in self.calls if call._name in names] |
| 279 | |
| 280 | def assert_contains(self, entries: Sequence[Tuple[str, str]]) -> None: |
| 281 | __tracebackhide__ = True |
| 282 | i = 0 |
| 283 | entries = list(entries) |
| 284 | backlocals = sys._getframe(1).f_locals |
| 285 | while entries: |
| 286 | name, check = entries.pop(0) |
| 287 | for ind, call in enumerate(self.calls[i:]): |
| 288 | if call._name == name: |
| 289 | print("NAMEMATCH", name, call) |
| 290 | if eval(check, backlocals, call.__dict__): |
| 291 | print("CHECKERMATCH", repr(check), "->", call) |
| 292 | else: |
| 293 | print("NOCHECKERMATCH", repr(check), "-", call) |
| 294 | continue |
| 295 | i += ind + 1 |
| 296 | break |
| 297 | print("NONAMEMATCH", name, "with", call) |
| 298 | else: |
| 299 | fail(f"could not find {name!r} check {check!r}") |
| 300 | |
| 301 | def popcall(self, name: str) -> RecordedHookCall: |
| 302 | __tracebackhide__ = True |
no test coverage detected