From b96e0a71a6ce4130b480b6c601befadbeec5dfe5 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 21 Nov 2019 01:23:36 +0100 Subject: [PATCH] pytester: LineMatcher: __tracebackhide__ with _fail Follow-up to 2228ccb (gone lost in resolving the conflict). --- src/_pytest/pytester.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/_pytest/pytester.py b/src/_pytest/pytester.py index bacb1c23d..f44a69a95 100644 --- a/src/_pytest/pytester.py +++ b/src/_pytest/pytester.py @@ -1481,6 +1481,7 @@ class LineMatcher: self._log_output = [] def _fail(self, msg): + __tracebackhide__ = True log_text = self._log_text self._log_output = [] pytest.fail(log_text)