From 796fba67880c9ce2011d4183dd574339e26618fa Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Tue, 19 May 2020 21:41:28 +0300 Subject: [PATCH] terminal: remove redundant write_fspath_result call This is already done in pytest_runtest_logstart, so the fspath is already guaranteed to have been printed (for xdist, it is disabled anyway). write_fspath_result is mildly expensive so it is worth avoiding calling it twice. --- src/_pytest/terminal.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/_pytest/terminal.py b/src/_pytest/terminal.py index a8122aafd..8ecb5a16b 100644 --- a/src/_pytest/terminal.py +++ b/src/_pytest/terminal.py @@ -473,10 +473,7 @@ class TerminalReporter: else: markup = {} if self.verbosity <= 0: - if not running_xdist and self.showfspath: - self.write_fspath_result(rep.nodeid, letter, **markup) - else: - self._tw.write(letter, **markup) + self._tw.write(letter, **markup) else: self._progress_nodeids_reported.add(rep.nodeid) line = self._locationline(rep.nodeid, *rep.location)