Assert that ``lines2`` are contained (linearly) in :attr:`stringio`'s value. Lines are matched using :func:`LineMatcher.fnmatch_lines <pytest.LineMatcher.fnmatch_lines>`.
(self, lines2: Sequence[str])
| 1557 | """:class:`python:io.StringIO()` instance used for input.""" |
| 1558 | |
| 1559 | def assert_contains_lines(self, lines2: Sequence[str]) -> None: |
| 1560 | """Assert that ``lines2`` are contained (linearly) in :attr:`stringio`'s value. |
| 1561 | |
| 1562 | Lines are matched using :func:`LineMatcher.fnmatch_lines <pytest.LineMatcher.fnmatch_lines>`. |
| 1563 | """ |
| 1564 | __tracebackhide__ = True |
| 1565 | val = self.stringio.getvalue() |
| 1566 | self.stringio.truncate(0) |
| 1567 | self.stringio.seek(0) |
| 1568 | lines1 = val.split("\n") |
| 1569 | LineMatcher(lines1).fnmatch_lines(lines2) |
| 1570 | |
| 1571 | |
| 1572 | class LineMatcher: |
no test coverage detected