Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7d8d3d3

Browse filesBrowse files
committed
TST: Mark Cairo backends as not threadsafe.
Cairo backends save the `cairo_t` object on the graphics context (as `self.gc.ctx`), but this object is not threadsafe.
1 parent ae1d2db commit 7d8d3d3
Copy full SHA for 7d8d3d3

File tree

Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed

‎lib/matplotlib/tests/test_backends_interactive.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backends_interactive.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,15 @@ def _test_thread_impl():
226226
_thread_safe_backends.append(
227227
pytest.param("macosx", marks=pytest.mark.xfail(
228228
raises=subprocess.TimeoutExpired, strict=True)))
229+
_thread_safe_backends = [
230+
pytest.param(
231+
backend,
232+
# Cairo backends save a cairo_t on the graphics context, and sharing
233+
# these is not threadsafe.
234+
marks=(pytest.mark.xfail(raises=subprocess.CalledProcessError))
235+
if 'cairo' in backend else [])
236+
for backend in _thread_safe_backends
237+
]
229238

230239

231240
@pytest.mark.parametrize("backend", _thread_safe_backends)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.