MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _get_testable_qt_backends

Function _get_testable_qt_backends

lib/matplotlib/tests/test_backend_qt.py:305–325  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303
304
305def _get_testable_qt_backends():
306 envs = []
307 for deps, env in [
308 ([qt_api], {"MPLBACKEND": "qtagg", "QT_API": qt_api})
309 for qt_api in ["PyQt6", "PySide6", "PyQt5", "PySide2"]
310 ]:
311 reason = None
312 missing = [dep for dep in deps if not importlib.util.find_spec(dep)]
313 if (sys.platform == "linux" and
314 not _c_internal_utils.display_is_valid()):
315 reason = "$DISPLAY and $WAYLAND_DISPLAY are unset"
316 elif missing:
317 reason = "{} cannot be imported".format(", ".join(missing))
318 elif env["MPLBACKEND"] == 'macosx' and os.environ.get('TF_BUILD'):
319 reason = "macosx backend fails on Azure"
320 marks = []
321 if reason:
322 marks.append(pytest.mark.skip(
323 reason=f"Skipping {env} because {reason}"))
324 envs.append(pytest.param(env, marks=marks, id=str(env)))
325 return envs
326
327
328@pytest.mark.backend('QtAgg', skip_on_importerror=True)

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…