Skip to content

Commit 360e403

Browse files
committed
Allow macosx thread safety test on macOS11
It appears to no longer timeout on that system, and is breaking CI, which just switched to it.
1 parent 1f66490 commit 360e403

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,11 @@ def _test_thread_impl():
222222
param.marks.append(
223223
pytest.mark.xfail(raises=subprocess.CalledProcessError))
224224
elif backend == "macosx":
225-
param.marks.append(
226-
pytest.mark.xfail(raises=subprocess.TimeoutExpired, strict=True))
225+
mac_ver = platform.mac_ver()[0]
226+
if mac_ver and int(mac_ver.split('.')[0]) < 11:
227+
param.marks.append(
228+
pytest.mark.xfail(raises=subprocess.TimeoutExpired,
229+
strict=True))
227230
elif param.values[0].get("QT_API") == "PySide2":
228231
param.marks.append(
229232
pytest.mark.xfail(raises=subprocess.CalledProcessError))

0 commit comments

Comments
 (0)