pytester: LineMatcher: use `_fail` with `_match_lines_random` (#6747)
This commit is contained in:
parent
f95c7f5803
commit
4021770688
|
@ -1354,8 +1354,9 @@ class LineMatcher:
|
|||
self._log("matched: ", repr(line))
|
||||
break
|
||||
else:
|
||||
self._log("line %r not found in output" % line)
|
||||
raise ValueError(self._log_text)
|
||||
msg = "line %r not found in output" % line
|
||||
self._log(msg)
|
||||
self._fail(msg)
|
||||
|
||||
def get_lines_after(self, fnline: str) -> Sequence[str]:
|
||||
"""Return all lines following the given line in the text.
|
||||
|
|
Loading…
Reference in New Issue