MCPcopy
hub / github.com/pytest-dev/pytest / get_lines_after

Method get_lines_after

src/_pytest/pytester.py:1626–1634  ·  view source on GitHub ↗

Return all lines following the given line in the text. The given line can contain glob wildcards.

(self, fnline: str)

Source from the content-addressed store, hash-verified

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.
1628
1629 The given line can contain glob wildcards.
1630 """
1631 for i, line in enumerate(self.lines):
1632 if fnline == line or fnmatch(line, fnline):
1633 return self.lines[i + 1 :]
1634 raise ValueError(f"line {fnline!r} not found in output")
1635
1636 def _log(self, *args) -> None:
1637 self._log_output.append(" ".join(str(x) for x in args))

Callers 1

test_calls_show_2Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected