Skip to content

Commit

Permalink
MAINT: Mark more tests as slow for macOS (mne-tools#9324)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner authored Apr 20, 2021
1 parent 19b62e9 commit fe0d3e3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
13 changes: 11 additions & 2 deletions mne/beamformer/tests/test_dics.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ def _simulate_data(fwd, idx): # Somewhere on the frontal lobe by default
return epochs, evoked, csd, source_vertno, label, vertices, source_ind


idx_param = pytest.mark.parametrize('idx', [0, 100, 200, 233])
idx_param = pytest.mark.parametrize('idx', [
0,
pytest.param(100, marks=pytest.mark.slowtest),
200,
pytest.param(233, marks=pytest.mark.slowtest),
])


def _rand_csd(rng, info):
Expand Down Expand Up @@ -139,7 +144,10 @@ def _make_rand_csd(info, csd):
@testing.requires_testing_data
@requires_h5py
@idx_param
@pytest.mark.parametrize('whiten', (False, True))
@pytest.mark.parametrize('whiten', [
pytest.param(False, marks=pytest.mark.slowtest),
True,
])
def test_make_dics(tmpdir, _load_forward, idx, whiten):
"""Test making DICS beamformer filters."""
# We only test proper handling of parameters here. Testing the results is
Expand Down Expand Up @@ -707,6 +715,7 @@ def _cov_as_csd(cov, info):

# Just test free ori here (assume fixed is same as LCMV if these are)
# Changes here should be synced with test_lcmv.py
@pytest.mark.slowtest
@pytest.mark.parametrize(
'reg, pick_ori, weight_norm, use_cov, depth, lower, upper, real_filter', [
(0.05, None, 'unit-noise-gain-invariant', False, None, 26, 28, False),
Expand Down
8 changes: 4 additions & 4 deletions mne/beamformer/tests/test_lcmv.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ def test_lcmv_ctf_comp():
@pytest.mark.parametrize('proj, weight_norm', [
(True, 'unit-noise-gain'),
(False, 'unit-noise-gain'),
(True, None),
(True, 'nai'),
pytest.param(True, None, marks=pytest.mark.slowtest),
pytest.param(True, 'nai', marks=pytest.mark.slowtest),
])
def test_lcmv_reg_proj(proj, weight_norm):
"""Test LCMV with and without proj."""
Expand Down Expand Up @@ -762,10 +762,10 @@ def test_orientation_max_power(bias_params_fixed, bias_params_free,


@pytest.mark.parametrize('weight_norm, pick_ori', [
('nai', 'max-power'),
pytest.param('nai', 'max-power', marks=pytest.mark.slowtest),
('unit-noise-gain', 'vector'),
('unit-noise-gain', 'max-power'),
('unit-noise-gain', None),
pytest.param('unit-noise-gain', None, marks=pytest.mark.slowtest),
])
def test_depth_does_not_matter(bias_params_free, weight_norm, pick_ori):
"""Test that depth weighting does not matter for normalized filters."""
Expand Down
4 changes: 3 additions & 1 deletion mne/io/fieldtrip/fieldtrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

from .utils import _create_info, _set_tmin, _create_events, \
_create_event_metadata, _validate_ft_struct
from .. import RawArray
from ...utils import _check_fname
from ..array.array import RawArray
from ...epochs import EpochsArray
from ...evoked import EvokedArray

Expand Down Expand Up @@ -44,6 +45,7 @@ def read_raw_fieldtrip(fname, info, data_name='data'):
A Raw Object containing the loaded data.
"""
from ...externals.pymatreader import read_mat
fname = _check_fname(fname, overwrite='read', must_exist=True)

ft_struct = read_mat(fname,
ignore_fields=['previous'],
Expand Down
9 changes: 6 additions & 3 deletions mne/io/fieldtrip/tests/test_fieldtrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@
use_info))
# just for speed we skip some slowest ones -- the coverage should still
# be sufficient
for key in [('CTF', 'v73', True), ('neuromag306', 'v73', False)]:
all_test_params_epochs.pop(all_test_params_epochs.index(key))
all_test_params_raw.pop(all_test_params_raw.index(key))
for obj in (all_test_params_epochs, all_test_params_raw):
for key in [('CTF', 'v73', True), ('neuromag306', 'v73', False)]:
obj.pop(obj.index(key))
for ki, key in enumerate(obj):
if key[1] == 'v73':
obj[ki] = pytest.param(*obj[ki], marks=pytest.mark.slowtest)

no_info_warning = {'expected_warning': RuntimeWarning,
'match': NOINFO_WARNING}
Expand Down
1 change: 1 addition & 0 deletions mne/viz/_brain/tests/test_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def test_notebook_alignment(renderer_notebook, brain_gc, nbexec):
assert fig.display is not None


@pytest.mark.slowtest # ~3 min on GitHub macOS
@testing.requires_testing_data
def test_notebook_interactive(renderer_notebook, brain_gc, nbexec):
"""Test interactive modes."""
Expand Down

0 comments on commit fe0d3e3

Please sign in to comment.