Skip to content

Commit 369c54b

Browse files
authored
MAINT: Patch old MNE ver test (#177)
1 parent 8ce2b26 commit 369c54b

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

.github/workflows/mne_1_4.patch

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/mne/viz/tests/test_raw.py b/mne/viz/tests/test_raw.py
2+
index 5533b5870..56ff1e607 100644
3+
--- a/mne/viz/tests/test_raw.py
4+
+++ b/mne/viz/tests/test_raw.py
5+
@@ -23,6 +23,7 @@ from mne.utils import (
6+
get_config,
7+
set_config,
8+
_assert_no_instances,
9+
+ check_version,
10+
)
11+
from mne.viz import plot_raw, plot_sensors
12+
from mne.viz.utils import _fake_click, _fake_keypress
13+
@@ -745,6 +746,7 @@ def test_plot_annotations(raw, browser_backend):
14+
assert fig.mne.regions[0].isVisible()
15+
16+
17+
+@pytest.mark.xfail(check_version("mne_qt_browser", "0.5.2"), reason="old behavior was wrong")
18+
@pytest.mark.parametrize("hide_which", ([], [0], [1], [0, 1]))
19+
def test_remove_annotations(raw, hide_which, browser_backend):
20+
"""Test that right-click doesn't remove hidden annotation spans."""

.github/workflows/qt_viz_tests.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
python-version: ${{ env.PYTHON_VERSION }}
7676
- name: Install dependencies
7777
run: | # use MNE main to ensure test files are available
78-
set -e
78+
set -eo pipefail
7979
python -m pip install --upgrade pip
8080
git clone -b ${MNE_BRANCH} --single-branch --branch main https://github.com/mne-tools/mne-python.git ../mne-python
8181
python -m pip install -qe ../mne-python
@@ -85,8 +85,7 @@ jobs:
8585
PIP_OPTION="[tests]"
8686
fi
8787
python -m pip install -ve .${PIP_OPTION} PyQt5
88-
- shell: bash -el {0}
89-
run: ./tools/get_testing_version.sh
88+
- run: ./tools/get_testing_version.sh
9089
name: 'Get testing version'
9190
working-directory: ../mne-python
9291
- uses: actions/cache@v3
@@ -159,7 +158,7 @@ jobs:
159158
python-version: ${{ env.PYTHON_VERSION }}
160159
- name: Install dependencies
161160
run: | # use MNE main to ensure test files are available
162-
set -e
161+
set -eo pipefail
163162
python -m pip install --upgrade pip
164163
git clone -b ${MNE_BRANCH} --single-branch --branch main https://github.com/mne-tools/mne-python.git ../mne-python
165164
python -m pip install -qe ../mne-python
@@ -176,7 +175,10 @@ jobs:
176175
PIP_OPTION="[tests]"
177176
fi
178177
python -m pip install -ve .${PIP_OPTION} ${QT_LIB_INSTALL}
179-
- shell: bash -el {0}
178+
- name: Patch MNE 1.4 test
179+
if: ${{ matrix.mne == '1.4' }}
180+
run: patch -d ../mne-python < .github/workflows/mne_1_4.patch
181+
- shell: bash -e {0}
180182
run: ./tools/get_testing_version.sh
181183
name: 'Get testing version'
182184
working-directory: ../mne-python

0 commit comments

Comments
 (0)