Check lines exist in the output (using :func:`python:fnmatch.fnmatch`). The argument is a list of lines which have to match and can use glob wildcards. If they do not match a pytest.fail() is called. The matches and non-matches are also shown as part of the error message.
(
self, lines2: Sequence[str], *, consecutive: bool = False
)
| 1594 | return "\n".join(self._log_output) |
| 1595 | |
| 1596 | def fnmatch_lines( |
| 1597 | self, lines2: Sequence[str], *, consecutive: bool = False |
| 1598 | ) -> None: |
| 1599 | """Check lines exist in the output (using :func:`python:fnmatch.fnmatch`). |
| 1600 | |
| 1601 | The argument is a list of lines which have to match and can use glob |
| 1602 | wildcards. If they do not match a pytest.fail() is called. The |
| 1603 | matches and non-matches are also shown as part of the error message. |
| 1604 | |
| 1605 | :param lines2: String patterns to match. |
| 1606 | :param consecutive: Match lines consecutively? |
| 1607 | """ |
| 1608 | __tracebackhide__ = True |
| 1609 | self._match_lines(lines2, fnmatch, "fnmatch", consecutive=consecutive) |
| 1610 | |
| 1611 | def re_match_lines( |
| 1612 | self, lines2: Sequence[str], *, consecutive: bool = False |
no test coverage detected