From 126507f5569794715d8c09d2f8908edbb1feb400 Mon Sep 17 00:00:00 2001 From: thomashopkins32 Date: Wed, 30 Jul 2025 14:40:27 -0400 Subject: [PATCH] Show subprocess stdout and stderr on pytest failure --- lib/matplotlib/testing/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/matplotlib/testing/__init__.py b/lib/matplotlib/testing/__init__.py index d6affb1b039f..904ee5d73db4 100644 --- a/lib/matplotlib/testing/__init__.py +++ b/lib/matplotlib/testing/__init__.py @@ -105,6 +105,16 @@ def subprocess_run_for_testing(command, env=None, timeout=60, stdout=None, import pytest pytest.xfail("Fork failure") raise + except subprocess.CalledProcessError as e: + if e.stdout: + _log.error(f"Subprocess output:\n{e.stdout}") + if e.stderr: + _log.error(f"Subprocess error:\n{e.stderr}") + raise e + if proc.stdout: + _log.debug(f"Subprocess output:\n{proc.stdout}") + if proc.stderr: + _log.debug(f"Subprocess error:\n{proc.stderr}") return proc pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy