From 1bcc2f87a253ab7616bd5f39b4fe829e1dcb3948 Mon Sep 17 00:00:00 2001 From: GergelyKalmar Date: Tue, 30 Nov 2021 18:59:46 +0100 Subject: [PATCH] Do not display empty worker info --- src/_pytest/reports.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/_pytest/reports.py b/src/_pytest/reports.py index 282682c47..a68e68bc5 100644 --- a/src/_pytest/reports.py +++ b/src/_pytest/reports.py @@ -76,7 +76,9 @@ class BaseReport: def toterminal(self, out: TerminalWriter) -> None: if hasattr(self, "node"): - out.line(getworkerinfoline(self.node)) + worker_info = getworkerinfoline(self.node) + if worker_info: + out.line(worker_info) longrepr = self.longrepr if longrepr is None: