Skip to content

Commit

Permalink
MAINT: Test notebook on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Sep 7, 2023
1 parent 33d5db7 commit a1720a0
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 27 deletions.
4 changes: 0 additions & 4 deletions mne/gui/tests/test_gui_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
#
# License: Simplified BSD

import sys
import pytest

from mne.utils import _check_qt_version

# These will skip all tests in this scope
pytestmark = pytest.mark.skipif(
sys.platform.startswith("win"), reason="nbexec does not work on Windows"
)
pytest.importorskip("nibabel")


Expand Down
7 changes: 0 additions & 7 deletions mne/viz/_brain/tests/test_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,10 @@
# NOTE: Tests in this directory must be self-contained because they are
# executed in a separate IPython kernel.

import sys
import pytest
from mne.datasets import testing


# This will skip all tests in this scope
pytestmark = pytest.mark.skipif(
sys.platform.startswith("win"), reason="nbexec does not work on Windows"
)


@testing.requires_testing_data
def test_notebook_alignment(renderer_notebook, brain_gc, nbexec):
"""Test plot alignment in a notebook."""
Expand Down
16 changes: 1 addition & 15 deletions mne/viz/backends/tests/test_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@
# License: Simplified BSD

from pathlib import Path
import sys

import pytest

from mne.viz.backends.renderer import _get_backend
from mne.viz.backends.tests._utils import skips_if_not_pyvistaqt

from mne.utils import check_version


def _do_widget_tests(backend):
# testing utils
Expand Down Expand Up @@ -119,16 +114,7 @@ def test_widget_abstraction_pyvistaqt(renderer_pyvistaqt):
_do_widget_tests(backend)


nb_skip_mark = pytest.mark.skipif(
sys.platform.startswith("win") or not check_version("ipympl"),
reason="need ipympl and nbexec does not work on Windows",
)


# Marking directly with skipif causes problems for nbexec, so let's get it in
# via a param
@pytest.mark.parametrize("skippy", [pytest.param("", marks=nb_skip_mark)])
def test_widget_abstraction_notebook(renderer_notebook, nbexec, skippy):
def test_widget_abstraction_notebook(renderer_notebook, nbexec):
"""Test the GUI widgets abstraction in notebook."""
from pathlib import Path
from mne.viz import set_3d_backend
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pyvista>=0.32,!=0.35.2,!=0.38.0,!=0.38.1,!=0.38.2,!=0.38.3,!=0.38.4,!=0.38.5,!=0
pyvistaqt>=0.4
mffpy>=0.5.7
ipywidgets
ipympl; platform_system!="Windows" # XXX: Add support when ipympl CIs include Windows
ipympl
ipyevents
trame
trame-vtk
Expand Down

0 comments on commit a1720a0

Please sign in to comment.