Skip to content

Commit 602e74c

Browse files
authored
Merge pull request #4107 from blueyed/__tracebackhide__
pytester: fix __tracebackhide__ for {re_,fn}match_lines
2 parents 4c9015c + b8fc3e5 commit 602e74c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/_pytest/pytester.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,6 +1323,7 @@ def fnmatch_lines(self, lines2):
13231323
matches and non-matches are also printed on stdout.
13241324
13251325
"""
1326+
__tracebackhide__ = True
13261327
self._match_lines(lines2, fnmatch, "fnmatch")
13271328

13281329
def re_match_lines(self, lines2):
@@ -1334,6 +1335,7 @@ def re_match_lines(self, lines2):
13341335
The matches and non-matches are also printed on stdout.
13351336
13361337
"""
1338+
__tracebackhide__ = True
13371339
self._match_lines(lines2, lambda name, pat: re.match(pat, name), "re.match")
13381340

13391341
def _match_lines(self, lines2, match_func, match_nickname):

0 commit comments

Comments
 (0)