From 5fd189bb041e69ea898cbc5640f8b274bd3454ec Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 22 May 2022 17:05:45 +0200 Subject: [PATCH 1/3] Try to unbreak CI by xfailing OSX Tk tests Stopgap solution for #23094 --- lib/matplotlib/tests/test_backend_tk.py | 4 ++++ lib/matplotlib/tests/test_backends_interactive.py | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/matplotlib/tests/test_backend_tk.py b/lib/matplotlib/tests/test_backend_tk.py index 1bc9b6c983ed..3109cd72e334 100644 --- a/lib/matplotlib/tests/test_backend_tk.py +++ b/lib/matplotlib/tests/test_backend_tk.py @@ -37,6 +37,10 @@ def _isolated_tk_test(success_count, func=None): sys.platform == "linux" and not _c_internal_utils.display_is_valid(), reason="$DISPLAY and $WAYLAND_DISPLAY are unset" ) + @pytest.xfail( # GitHub issue #23094 + reason="Tk version mismatch on OSX CI", + condition=sys.platform == 'darwin' + ) @functools.wraps(func) def test_func(): # even if the package exists, may not actually be importable this can diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py index a0d0f64f1ec7..fe59dced912b 100644 --- a/lib/matplotlib/tests/test_backends_interactive.py +++ b/lib/matplotlib/tests/test_backends_interactive.py @@ -59,6 +59,9 @@ def _get_testable_interactive_backends(): elif env["MPLBACKEND"].startswith('wx') and sys.platform == 'darwin': # ignore on OSX because that's currently broken (github #16849) marks.append(pytest.mark.xfail(reason='github #16849')) + elif env["MPLBACKEND"] == "tkagg" and sys.platform == 'darwin': + marks.append( # GitHub issue #23094 + pytest.mark.xfail(reason="Tk version mismatch on OSX CI")) envs.append( pytest.param( {**env, 'BACKEND_DEPS': ','.join(deps)}, @@ -236,6 +239,9 @@ def _test_thread_impl(): reason='PyPy does not support Tkinter threading: ' 'https://foss.heptapod.net/pypy/pypy/-/issues/1929', strict=True)) + elif backend == "tkagg" and sys.platform == "darwin": + param.marks.append( # GitHub issue #23094 + pytest.mark.xfail("Tk version mismatch on OSX CI")) @pytest.mark.parametrize("env", _thread_safe_backends) @@ -510,6 +516,10 @@ def _test_number_of_draws_script(): elif backend == "wx": param.marks.append( pytest.mark.skip("wx does not support blitting")) + elif backend == "tkagg" and sys.platform == "darwin": + param.marks.append( # GitHub issue #23094 + pytest.mark.xfail("Tk version mismatch on OSX CI") + ) @pytest.mark.parametrize("env", _blit_backends) From e79d36545e7c0519bd68ea0222412468ac720b5a Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Mon, 23 May 2022 08:55:17 +0200 Subject: [PATCH 2/3] Update lib/matplotlib/tests/test_backend_tk.py --- lib/matplotlib/tests/test_backend_tk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/tests/test_backend_tk.py b/lib/matplotlib/tests/test_backend_tk.py index 3109cd72e334..70445b0b426c 100644 --- a/lib/matplotlib/tests/test_backend_tk.py +++ b/lib/matplotlib/tests/test_backend_tk.py @@ -38,8 +38,8 @@ def _isolated_tk_test(success_count, func=None): reason="$DISPLAY and $WAYLAND_DISPLAY are unset" ) @pytest.xfail( # GitHub issue #23094 - reason="Tk version mismatch on OSX CI", - condition=sys.platform == 'darwin' + sys.platform == 'darwin', + reason="Tk version mismatch on OSX CI" ) @functools.wraps(func) def test_func(): From 6c6403e06135a7d8dce9083dfdc42d1e516b636f Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Mon, 23 May 2022 09:54:52 +0200 Subject: [PATCH 3/3] Update lib/matplotlib/tests/test_backend_tk.py --- lib/matplotlib/tests/test_backend_tk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/tests/test_backend_tk.py b/lib/matplotlib/tests/test_backend_tk.py index 70445b0b426c..131c766d6328 100644 --- a/lib/matplotlib/tests/test_backend_tk.py +++ b/lib/matplotlib/tests/test_backend_tk.py @@ -37,7 +37,7 @@ def _isolated_tk_test(success_count, func=None): sys.platform == "linux" and not _c_internal_utils.display_is_valid(), reason="$DISPLAY and $WAYLAND_DISPLAY are unset" ) - @pytest.xfail( # GitHub issue #23094 + @pytest.mark.xfail( # GitHub issue #23094 sys.platform == 'darwin', reason="Tk version mismatch on OSX CI" )