From 3c1c130c598b4e436944d15fd059c1f22aa69660 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Mon, 23 Feb 2026 13:49:26 +0100 Subject: [PATCH] testing: disable progress reports in tap mode pytest-tap didn't get it right in combination with xdist. we need to replace the reporter *completely*, which is just incredibly weird :/ Change-Id: I2e35b9dc8ea4b24563b9b3306312778781eb674e --- tests/functional2/conftest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/functional2/conftest.py b/tests/functional2/conftest.py index 3c16b3872..d58b9f3f7 100644 --- a/tests/functional2/conftest.py +++ b/tests/functional2/conftest.py @@ -41,6 +41,7 @@ import argparse import sys import pytest +from _pytest.terminal import TerminalReporter from tap.formatter import format_as_diagnostics from tap.tracker import Tracker @@ -64,9 +65,12 @@ class TAPPlugin: ) if self._tracker.streaming and not _is_xdist_worker: + # replace the reporter if present to discard all xdist progress reports reporter = config.pluginmanager.getplugin("terminalreporter") if reporter: config.pluginmanager.unregister(reporter) + reporter = TerminalReporter(config, open("/dev/null", "w")) + config.pluginmanager.register(reporter, "terminalreporter") # A common pytest pattern is to use test functions without classes. # The header looks really dumb for that pattern because it puts # out a lot of line noise since every function gets its own header.