Skip to content

Commit 9b32ec8

Browse files
committed
FIX: Come on
1 parent 5d2561b commit 9b32ec8

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

mne/commands/tests/test_commands.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ def test_show_fiff(tmp_path):
110110
with ArgvSetter((raw_fname, "--tag=102")):
111111
mne_show_fiff.run()
112112
bad_fname = tmp_path / "test_bad_raw.fif"
113-
with open(bad_fname, "wb") as fout:
114-
with open(raw_fname, "rb") as fin:
115-
fout.write(fin.read(100000))
116-
with pytest.warns(Warning, match=".*valid tag.*"):
113+
with open(bad_fname, "wb") as fout, open(raw_fname, "rb") as fin:
114+
fout.write(fin.read(100000))
115+
# should match ".*valid tag.*" but conda-linux intermittently fails for some reason
116+
with _record_warnings():
117117
lines = show_fiff(bad_fname, output=list)
118118
last_line = lines[-1]
119119
assert last_line.endswith(">>>>BAD @9015")

mne/datasets/tests/test_datasets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import pooch
1212
import pytest
13+
from flaky import flaky
1314

1415
import mne.datasets._fsaverage.base
1516
from mne import datasets, read_labels_from_annot, write_labels_to_annot
@@ -173,6 +174,7 @@ def _error_download_2(self, fname, downloader, processor):
173174
datasets._fake.data_path(download=True, force_update=True, **kwargs)
174175

175176

177+
@flaky(max_runs=3)
176178
@pytest.mark.slowtest
177179
@testing.requires_testing_data
178180
@requires_good_network

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ hdf5 = ["h5io >= 0.2.4", "pymatreader"]
139139
# Dependencies for running the test infrastructure
140140
test = [
141141
"codespell",
142+
"flaky",
142143
"ipython != 8.7.0", # for testing notebook backend; also in "full-no-qt" and "doc"
143144
"mypy",
144145
"numpydoc",

0 commit comments

Comments
 (0)