(
self, lines2: Sequence[str], match_func: Callable[[str, str], bool]
)
| 1562 | self._match_lines_random(lines2, lambda name, pat: bool(re.match(pat, name))) |
| 1563 | |
| 1564 | def _match_lines_random( |
| 1565 | self, lines2: Sequence[str], match_func: Callable[[str, str], bool] |
| 1566 | ) -> None: |
| 1567 | __tracebackhide__ = True |
| 1568 | lines2 = self._getlines(lines2) |
| 1569 | for line in lines2: |
| 1570 | for x in self.lines: |
| 1571 | if line == x or match_func(x, line): |
| 1572 | self._log("matched: ", repr(line)) |
| 1573 | break |
| 1574 | else: |
| 1575 | msg = "line %r not found in output" % line |
| 1576 | self._log(msg) |
| 1577 | self._fail(msg) |
| 1578 | |
| 1579 | def get_lines_after(self, fnline: str) -> Sequence[str]: |
| 1580 | """Return all lines following the given line in the text. |
no test coverage detected