Skip to content

Commit 796fba6

Browse files
committed
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.
1 parent 139a029 commit 796fba6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/_pytest/terminal.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,7 @@ def pytest_runtest_logreport(self, report: TestReport) -> None:
473473
else:
474474
markup = {}
475475
if self.verbosity <= 0:
476-
if not running_xdist and self.showfspath:
477-
self.write_fspath_result(rep.nodeid, letter, **markup)
478-
else:
479-
self._tw.write(letter, **markup)
476+
self._tw.write(letter, **markup)
480477
else:
481478
self._progress_nodeids_reported.add(rep.nodeid)
482479
line = self._locationline(rep.nodeid, *rep.location)

0 commit comments

Comments
 (0)