Skip to content

Commit

Permalink
MAINT: Work around PySide 6.5.3 event loop error (mne-tools#12076)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner authored and snwnde committed Mar 20, 2024
1 parent 2603f4d commit 5cbee84
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mne/viz/_brain/tests/test_brain.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,11 +738,14 @@ def tiny(tmp_path):
def test_brain_screenshot(renderer_interactive_pyvistaqt, tmp_path, brain_gc):
"""Test time viewer screenshot."""
# This is broken on Conda + GHA for some reason
from qtpy import API_NAME

if (
os.getenv("CONDA_PREFIX", "") != ""
and os.getenv("GITHUB_ACTIONS", "") == "true"
or API_NAME.lower() == "pyside6"
):
pytest.skip("Test is unreliable on GitHub Actions conda runs")
pytest.skip("Test is unreliable on GitHub Actions conda runs and pyside6")
tiny_brain, ratio = tiny(tmp_path)
img_nv = tiny_brain.screenshot(time_viewer=False)
want = (_TINY_SIZE[1] * ratio, _TINY_SIZE[0] * ratio, 3)
Expand Down Expand Up @@ -1096,6 +1099,10 @@ def test_brain_traces(renderer_interactive_pyvistaqt, hemi, src, tmp_path, brain
def test_brain_scraper(renderer_interactive_pyvistaqt, brain_gc, tmp_path):
"""Test a simple scraping example."""
pytest.importorskip("sphinx_gallery")
from qtpy import API_NAME

if API_NAME.lower() == "pyside6":
pytest.skip("Error in event loop on PySidie6")
stc = read_source_estimate(fname_stc, subject="sample")
size = (600, 400)
brain = stc.plot(
Expand Down

0 comments on commit 5cbee84

Please sign in to comment.