From c95a0a538a4ff7df2639325ee769debb502f78c8 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Fri, 30 Sep 2022 00:06:41 +0200 Subject: [PATCH] Backport PR #24046: Ignore 'CFMessagePort: bootstrap_register' messages --- lib/matplotlib/tests/test_backend_tk.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/tests/test_backend_tk.py b/lib/matplotlib/tests/test_backend_tk.py index 5ad3e3ff28b9..4d43e27aa4a4 100644 --- a/lib/matplotlib/tests/test_backend_tk.py +++ b/lib/matplotlib/tests/test_backend_tk.py @@ -53,11 +53,14 @@ def test_func(): + str(e.stderr)) else: # macOS may actually emit irrelevant errors about Accelerated - # OpenGL vs. software OpenGL, so suppress them. + # OpenGL vs. software OpenGL, or some permission error on Azure, so + # suppress them. # Asserting stderr first (and printing it on failure) should be # more helpful for debugging that printing a failed success count. + ignored_lines = ["OpenGL", "CFMessagePort: bootstrap_register", + "/usr/include/servers/bootstrap_defs.h"] assert not [line for line in proc.stderr.splitlines() - if "OpenGL" not in line] + if all(msg not in line for msg in ignored_lines)] assert proc.stdout.count("success") == success_count return test_func