From 95d1d666e05cacf8f8a0096430fe50c5d719feb0 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Thu, 15 Jun 2023 21:34:44 -0500 Subject: [PATCH] Backport PR #26135: TST: xfail Tk test on Python 3.9 Azure macOS also --- lib/matplotlib/tests/test_backend_tk.py | 2 +- lib/matplotlib/tests/test_backends_interactive.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/matplotlib/tests/test_backend_tk.py b/lib/matplotlib/tests/test_backend_tk.py index 73e7d16961b4..cd2f5353fc9d 100644 --- a/lib/matplotlib/tests/test_backend_tk.py +++ b/lib/matplotlib/tests/test_backend_tk.py @@ -40,7 +40,7 @@ def _isolated_tk_test(success_count, func=None): ) @pytest.mark.xfail( # https://github.com/actions/setup-python/issues/649 'TF_BUILD' in os.environ and sys.platform == 'darwin' and - sys.version_info[:2] == (3, 10), + sys.version_info[:2] < (3, 11), reason='Tk version mismatch on Azure macOS CI' ) @functools.wraps(func) diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py index 193fd6f5e5ed..f6fffad31544 100644 --- a/lib/matplotlib/tests/test_backends_interactive.py +++ b/lib/matplotlib/tests/test_backends_interactive.py @@ -64,7 +64,7 @@ def _get_testable_interactive_backends(): # ignore on OSX because that's currently broken (github #16849) marks.append(pytest.mark.xfail(reason='github #16849')) elif (env['MPLBACKEND'] == 'tkagg' and 'TF_BUILD' in os.environ and - sys.platform == 'darwin' and sys.version_info[:2] == (3, 10)): + sys.platform == 'darwin' and sys.version_info[:2] < (3, 11)): marks.append( # https://github.com/actions/setup-python/issues/649 pytest.mark.xfail(reason='Tk version mismatch on Azure macOS CI')) envs.append( @@ -272,7 +272,7 @@ def _test_thread_impl(): 'https://foss.heptapod.net/pypy/pypy/-/issues/1929', strict=True)) elif (backend == 'tkagg' and 'TF_BUILD' in os.environ and - sys.platform == 'darwin' and sys.version_info[:2] == (3, 10)): + sys.platform == 'darwin' and sys.version_info[:2] < (3, 11)): param.marks.append( # https://github.com/actions/setup-python/issues/649 pytest.mark.xfail('Tk version mismatch on Azure macOS CI')) @@ -553,7 +553,7 @@ def _test_number_of_draws_script(): param.marks.append( pytest.mark.skip("wx does not support blitting")) elif (backend == 'tkagg' and 'TF_BUILD' in os.environ and - sys.platform == 'darwin' and sys.version_info[:2] == (3, 10)): + sys.platform == 'darwin' and sys.version_info[:2] < (3, 11)): param.marks.append( # https://github.com/actions/setup-python/issues/649 pytest.mark.xfail('Tk version mismatch on Azure macOS CI') )