(
self, lines2: Sequence[str], match_func: Callable[[str, str], bool]
)
| 1609 | self._match_lines_random(lines2, lambda name, pat: bool(re.match(pat, name))) |
| 1610 | |
| 1611 | def _match_lines_random( |
| 1612 | self, lines2: Sequence[str], match_func: Callable[[str, str], bool] |
| 1613 | ) -> None: |
| 1614 | __tracebackhide__ = True |
| 1615 | lines2 = self._getlines(lines2) |
| 1616 | for line in lines2: |
| 1617 | for x in self.lines: |
| 1618 | if line == x or match_func(x, line): |
| 1619 | self._log("matched: ", repr(line)) |
| 1620 | break |
| 1621 | else: |
| 1622 | msg = f"line {line!r} not found in output" |
| 1623 | self._log(msg) |
| 1624 | self._fail(msg) |
| 1625 | |
| 1626 | def get_lines_after(self, fnline: str) -> Sequence[str]: |
| 1627 | """Return all lines following the given line in the text. |
no test coverage detected