Skip to content

Commit

Permalink
FIX: Conda
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Feb 4, 2025
1 parent 855ba13 commit 899f930
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
13 changes: 10 additions & 3 deletions mne/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import inspect
import os
import os.path as op
import platform
import re
import shutil
import sys
Expand Down Expand Up @@ -287,9 +288,10 @@ def __init__(self, exception_handler=None, signals=None):
@pytest.fixture(scope="session")
def azure_windows():
"""Determine if running on Azure Windows."""
return os.getenv(
"AZURE_CI_WINDOWS", "false"
).lower() == "true" and sys.platform.startswith("win")
return (
os.getenv("AZURE_CI_WINDOWS", "false").lower() == "true"
and platform.system() == "Windows"
)


@pytest.fixture(scope="function")
Expand Down Expand Up @@ -612,6 +614,11 @@ def renderer_pyvistaqt(request, options_3d, garbage_collect):
@pytest.fixture(params=[pytest.param("notebook", marks=pytest.mark.pvtest)])
def renderer_notebook(request, options_3d):
"""Yield the 3D notebook renderer."""
if (
os.getenv("MNE_CI_KIND", "") in ("conda", "mamba")
and platform.system() == "Linux"
):
pytest.skip("Skipping notebook tests on conda Linux CI")
with _use_backend(request.param, interactive=False) as renderer:
yield renderer

Expand Down
8 changes: 0 additions & 8 deletions mne/viz/tests/test_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# License: BSD-3-Clause
# Copyright the MNE-Python contributors.

import os
import platform
from contextlib import nullcontext
from pathlib import Path

Expand Down Expand Up @@ -227,14 +225,8 @@ def test_plot_evoked_field(renderer):
assert isinstance(fig, Figure3D)


bad_ci = (
os.getenv("MNE_CI_KIND", "") in ("conda", "mamba") and platform.system() == "Linux"
)


@testing.requires_testing_data
@pytest.mark.slowtest
@pytest.mark.skipif(bad_ci, reason="Segfaults on Linux conda CI")
def test_plot_evoked_field_notebook(renderer_notebook, nbexec):
"""Test plotting the evoked field inside a notebook."""
import pytest
Expand Down

0 comments on commit 899f930

Please sign in to comment.