11
11
pytest .importorskip ("nibabel" )
12
12
13
13
14
- def test_gui_api (renderer_notebook , nbexec , * , n_warn = 0 , backend = "qt" ):
14
+ def test_gui_api (renderer_notebook , nbexec , * , backend = "qt" ):
15
15
"""Test GUI API."""
16
16
import contextlib
17
- import sys
18
17
import warnings
19
18
20
19
import mne
@@ -25,7 +24,6 @@ def test_gui_api(renderer_notebook, nbexec, *, n_warn=0, backend="qt"):
25
24
except Exception :
26
25
# Notebook standalone mode
27
26
backend = "notebook"
28
- n_warn = 0
29
27
# nbexec does not expose renderer_notebook so I use a
30
28
# temporary variable to synchronize the tests
31
29
if backend == "notebook" :
@@ -44,8 +42,7 @@ def test_gui_api(renderer_notebook, nbexec, *, n_warn=0, backend="qt"):
44
42
with mne .utils ._record_warnings () as w :
45
43
renderer ._window_set_theme ("dark" )
46
44
w = [ww for ww in w if "is not yet supported" in str (ww .message )]
47
- if sys .platform != "darwin" : # sometimes this is fine
48
- assert len (w ) == n_warn , [ww .message for ww in w ]
45
+ assert len (w ) == 0 , [ww .message for ww in w ]
49
46
50
47
# window without 3d plotter
51
48
if backend == "qt" :
@@ -387,10 +384,9 @@ def _check_widget_trigger(
387
384
def test_gui_api_qt (renderer_interactive_pyvistaqt ):
388
385
"""Test GUI API with the Qt backend."""
389
386
_ , api = _check_qt_version (return_api = True )
390
- n_warn = int (api in ("PySide6" , "PyQt6" ))
391
387
# TODO: After merging https://github.com/mne-tools/mne-python/pull/11567
392
388
# The Qt CI run started failing about 50% of the time, so let's skip this
393
389
# for now.
394
390
if api == "PySide6" :
395
391
pytest .skip ("PySide6 causes segfaults on CIs sometimes" )
396
- test_gui_api (None , None , n_warn = n_warn , backend = "qt" )
392
+ test_gui_api (None , None , backend = "qt" )
0 commit comments