Skip to content

Allow macosx thread safety test on macOS11 #21288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/matplotlib/tests/test_backends_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,14 @@ def _test_thread_impl():
param.marks.append(
pytest.mark.xfail(raises=subprocess.CalledProcessError))
elif backend == "macosx":
param.marks.append(
pytest.mark.xfail(raises=subprocess.TimeoutExpired, strict=True))
from packaging.version import parse
mac_ver = platform.mac_ver()[0]
# Note, macOS Big Sur is both 11 and 10.16, depending on SDK that
# Python was compiled against.
if mac_ver and parse(mac_ver) < parse('10.16'):
param.marks.append(
pytest.mark.xfail(raises=subprocess.TimeoutExpired,
strict=True))
elif param.values[0].get("QT_API") == "PySide2":
param.marks.append(
pytest.mark.xfail(raises=subprocess.CalledProcessError))
Expand Down