From b8fc3e569ae0997b081b4002f2d663e8f477ffaf Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 10 Oct 2018 18:38:13 +0200 Subject: [PATCH] pytester: fix __tracebackhide__ for {re_,fn}match_lines --- src/_pytest/pytester.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/_pytest/pytester.py b/src/_pytest/pytester.py index 31d9f7860..1e64c1747 100644 --- a/src/_pytest/pytester.py +++ b/src/_pytest/pytester.py @@ -1323,6 +1323,7 @@ class LineMatcher(object): matches and non-matches are also printed on stdout. """ + __tracebackhide__ = True self._match_lines(lines2, fnmatch, "fnmatch") def re_match_lines(self, lines2): @@ -1334,6 +1335,7 @@ class LineMatcher(object): The matches and non-matches are also printed on stdout. """ + __tracebackhide__ = True self._match_lines(lines2, lambda name, pat: re.match(pat, name), "re.match") def _match_lines(self, lines2, match_func, match_nickname):