Skip to content

Commit 4ee984f

Browse files
authored
Merge pull request #6250 from blueyed/tbh
pytester: LineMatcher: __tracebackhide__ with _fail
2 parents 58ec5be + b96e0a7 commit 4ee984f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/_pytest/pytester.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,7 @@ def _no_match_line(self, pat, match_func, match_nickname):
14811481
self._log_output = []
14821482

14831483
def _fail(self, msg):
1484+
__tracebackhide__ = True
14841485
log_text = self._log_text
14851486
self._log_output = []
14861487
pytest.fail(log_text)

0 commit comments

Comments
 (0)