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.
This commit is contained in:
Ran Benita 2020-05-19 21:41:28 +03:00
parent 139a029b5e
commit 796fba6788
1 changed files with 1 additions and 4 deletions

View File

@ -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)