From 56c30dc605d37dd187cdae5d7c0ffdd83be8dfe2 Mon Sep 17 00:00:00 2001 From: Sina Atalay <79940989+sinaatalay@users.noreply.github.com> Date: Sat, 21 Mar 2026 15:11:28 +0300 Subject: [PATCH] Show stdout/stderr in offline wheel test failures for better diagnostics --- tests/test_offline_whl.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_offline_whl.py b/tests/test_offline_whl.py index d60ab933..a12107a5 100644 --- a/tests/test_offline_whl.py +++ b/tests/test_offline_whl.py @@ -18,9 +18,17 @@ OFFLINE_ENV = { def run(args: list[str], **kwargs) -> subprocess.CompletedProcess[str]: """Run a subprocess with sensible defaults.""" - return subprocess.run( - args, capture_output=True, text=True, timeout=120, check=True, **kwargs + result = subprocess.run( + args, capture_output=True, text=True, timeout=120, check=False, **kwargs ) + if result.returncode != 0: + message = ( + f"Command {args} failed with exit code {result.returncode}\n" + f"stdout:\n{result.stdout}\n" + f"stderr:\n{result.stderr}" + ) + raise AssertionError(message) + return result def test_rendercv_renders_pdf_offline(tmp_path: pathlib.Path) -> None: