LineMatcher: add option to match all lines #6820
Labels
plugin: pytester
related to the pytester builtin plugin
type: enhancement
new feature or API change, should be merged into features branch
In #6653
consecutive
was added, which allows to ensure that the subset of lines is matched consecutively.However, it would also be useful to have a mode that ensures that all expected
lines are in the output, e.g.
complete=True
:LineMatcher(["unexpected", "1", "2", "3"]).fnmatch_lines(["1", "2", "3"], complete=True)
should fail then (since "unexpected" was not asserted).Given that
consecutive
has not been released and that it overlaps (sincecomplete
would implyconsecutive
) it might be worth to change this into a more genericmode
argument.The text was updated successfully, but these errors were encountered: