Skip to content

Commit

Permalink
FIX: No need
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Mar 12, 2024
1 parent 4ac59bf commit 9d2f771
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions mne/gui/tests/test_gui_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
pytest.importorskip("nibabel")


def test_gui_api(renderer_notebook, nbexec, *, n_warn=0, backend="qt"):
def test_gui_api(renderer_notebook, nbexec, *, backend="qt"):
"""Test GUI API."""
import contextlib
import sys
import warnings

import mne
Expand All @@ -25,7 +24,6 @@ def test_gui_api(renderer_notebook, nbexec, *, n_warn=0, backend="qt"):
except Exception:
# Notebook standalone mode
backend = "notebook"
n_warn = 0
# nbexec does not expose renderer_notebook so I use a
# temporary variable to synchronize the tests
if backend == "notebook":
Expand All @@ -44,8 +42,7 @@ def test_gui_api(renderer_notebook, nbexec, *, n_warn=0, backend="qt"):
with mne.utils._record_warnings() as w:
renderer._window_set_theme("dark")
w = [ww for ww in w if "is not yet supported" in str(ww.message)]
if sys.platform != "darwin": # sometimes this is fine
assert len(w) == n_warn, [ww.message for ww in w]
assert len(w) == 0, [ww.message for ww in w]

# window without 3d plotter
if backend == "qt":
Expand Down Expand Up @@ -387,10 +384,9 @@ def _check_widget_trigger(
def test_gui_api_qt(renderer_interactive_pyvistaqt):
"""Test GUI API with the Qt backend."""
_, api = _check_qt_version(return_api=True)
n_warn = int(api in ("PySide6", "PyQt6"))
# TODO: After merging https://github.com/mne-tools/mne-python/pull/11567
# The Qt CI run started failing about 50% of the time, so let's skip this
# for now.
if api == "PySide6":
pytest.skip("PySide6 causes segfaults on CIs sometimes")
test_gui_api(None, None, n_warn=n_warn, backend="qt")
test_gui_api(None, None, backend="qt")

0 comments on commit 9d2f771

Please sign in to comment.