diff --git a/tests/test_controller.py b/tests/test_controller.py index cf818e28..f272a3dd 100644 --- a/tests/test_controller.py +++ b/tests/test_controller.py @@ -2,6 +2,7 @@ from __future__ import annotations +import os from typing import TYPE_CHECKING, Any, Callable, cast, no_type_check from unittest.mock import MagicMock, Mock, patch @@ -20,6 +21,11 @@ if TYPE_CHECKING: from ndv.controllers._channel_controller import ChannelController +try: + from qtpy import QT_API +except ImportError: + QT_API = None + def _get_mock_canvas() -> ArrayCanvas: mock = MagicMock(spec=ArrayCanvas) @@ -213,6 +219,9 @@ def test_array_viewer_histogram() -> None: if _app.gui_frontend() != _app.GuiFrontend.QT: pytest.skip("histograms only implemented in Qt.") return + if os.name == "nt" and QT_API == "PySide6" and _app.canvas_backend() == "pygfx": + pytest.skip("pygfx not supported on Windows with PySide6.") + return viewer = ArrayViewer() viewer.show()