diff --git a/mne/_fiff/tests/test_constants.py b/mne/_fiff/tests/test_constants.py index e8baff2f1d3..43ea2290346 100644 --- a/mne/_fiff/tests/test_constants.py +++ b/mne/_fiff/tests/test_constants.py @@ -10,7 +10,6 @@ import numpy as np import pooch import pytest -from flaky import flaky from mne._fiff.constants import ( FIFF, @@ -118,7 +117,7 @@ ) -@flaky +@pytest.mark.flaky @requires_good_network @pytest.mark.ultraslowtest # not that slow, just doesn't need to run very often def test_constants(tmp_path): diff --git a/mne/channels/tests/test_channels.py b/mne/channels/tests/test_channels.py index e3dc5904e5b..697b49e7943 100644 --- a/mne/channels/tests/test_channels.py +++ b/mne/channels/tests/test_channels.py @@ -11,7 +11,6 @@ import numpy as np import pooch import pytest -from flaky import flaky from numpy.testing import assert_allclose, assert_array_equal, assert_equal from scipy.io import savemat @@ -359,7 +358,7 @@ def test_read_ch_adjacency(tmp_path): # This test is ~15s long across all montages, and we shouldn't need to check super # often for mismatches. So let's mark it ultraslowtest so only one CI runs it. -@flaky +@pytest.mark.flaky @pytest.mark.ultraslowtest @requires_good_network @pytest.mark.parametrize("adj", _CHECK_ADJ) diff --git a/mne/io/eeglab/tests/test_eeglab.py b/mne/io/eeglab/tests/test_eeglab.py index 2b05d8da14d..a042566fbc9 100644 --- a/mne/io/eeglab/tests/test_eeglab.py +++ b/mne/io/eeglab/tests/test_eeglab.py @@ -9,7 +9,6 @@ import numpy as np import pytest -from flaky import flaky from numpy.testing import ( assert_allclose, assert_array_almost_equal, @@ -769,7 +768,7 @@ def test_eeglab_drop_nan_annotations(tmp_path): raw = read_raw_eeglab(file_path, preload=True) -@flaky +@pytest.mark.flaky @testing.requires_testing_data @pytest.mark.timeout(10) @pytest.mark.slowtest # has the advantage of not running on macOS where it errs a lot diff --git a/mne/utils/tests/test_config.py b/mne/utils/tests/test_config.py index 41148827838..0940472569d 100644 --- a/mne/utils/tests/test_config.py +++ b/mne/utils/tests/test_config.py @@ -13,7 +13,6 @@ from urllib.error import URLError import pytest -from flaky import flaky import mne import mne.utils.config @@ -179,7 +178,7 @@ def test_get_subjects_dir(tmp_path, monkeypatch): get_subjects_dir(raise_error=True) -@flaky(max_runs=3) +@pytest.mark.flaky(reruns=3) @pytest.mark.ultraslowtest # not ultraslow, just flaky and not changed often @requires_good_network def test_sys_info_check_outdated(monkeypatch): diff --git a/pyproject.toml b/pyproject.toml index 84536bf174b..4bcb69b0655 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,6 @@ doc = [ ] test = [ "codespell", - "flaky", "ipython != 8.7.0", # for testing notebook backend; also in "full-no-qt" and "doc" "mypy", "numpydoc", @@ -44,6 +43,7 @@ test = [ "pytest >= 8.0", "pytest-cov", "pytest-qt", + "pytest-rerunfailures", "pytest-timeout", "ruff", "toml-sort",