Skip to content

Commit

Permalink
change skip logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Jan 22, 2025
1 parent 0e6c69d commit c5079c2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
from ndv.controllers._channel_controller import ChannelController

try:
from qtpy import QT_API
from qtpy import API_NAME
except ImportError:
QT_API = None
API_NAME = None

IS_WIN = os.name == "nt"
IS_PYSIDE6 = API_NAME == "PySide6"
IS_PYGFX = _app.canvas_backend(None) == "pygfx"


def _get_mock_canvas() -> ArrayCanvas:
Expand Down Expand Up @@ -213,15 +217,15 @@ def test_array_viewer_with_app() -> None:
assert viewer.display_model.visible_axes == (0, -2, -1)


@pytest.mark.skipif(
bool(IS_WIN and IS_PYSIDE6 and IS_PYGFX), reason="combo still segfaulting on CI"
)
@pytest.mark.usefixtures("any_app")
def test_array_viewer_histogram() -> None:
"""Mostly a smoke test for basic functionality of histogram backends."""
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()
Expand Down

0 comments on commit c5079c2

Please sign in to comment.