Skip to content

Commit ad30c6a

Browse files
committed
add version guard on more tests
1 parent 7d6b576 commit ad30c6a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mne_bids/tests/test_write.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3207,6 +3207,7 @@ def test_anonymize(subject, dir_name, fname, reader, tmp_path, _bids_validate):
32073207
bids_path.update(task="noise", session=raw_date, suffix="meg", datatype="meg")
32083208
write_kw = dict(empty_room=None)
32093209
elif dir_name == "Brainvision": # pretend it's EMG data
3210+
pytest.importorskip("mne", minversion="1.10.2", reason="BDF export")
32103211
raw.set_channel_types({ch: "emg" for ch in raw.ch_names})
32113212
raw.set_montage(None)
32123213
bids_path.update(task="task", suffix="emg", datatype="emg")
@@ -3388,6 +3389,7 @@ def test_sidecar_encoding(_bids_validate, tmp_path):
33883389
@testing.requires_testing_data
33893390
def test_emg_errors_and_warnings(tmp_path):
33903391
"""Test EMG-specific error/warning raising."""
3392+
pytest.importorskip("mne", minversion="1.10.2", reason="BDF export")
33913393
bids_root = tmp_path / "EMG_errors"
33923394
raw_fname = data_path / "Brainvision" / "test_NO.vhdr"
33933395
bids_path = _bids_path.copy().update(root=bids_root, datatype="emg")
@@ -3894,6 +3896,8 @@ def test_preload_errors(tmp_path):
38943896
)
38953897
def test_preload(_bids_validate, tmp_path, format, ch_type):
38963898
"""Test writing custom preloaded raw objects."""
3899+
if format == "emg":
3900+
pytest.importorskip("mne", minversion="1.10.2", reason="BDF export")
38973901
bids_root = tmp_path / "bids"
38983902
bids_path = _bids_path.copy().update(root=bids_root)
38993903
sfreq = 1024.0

0 commit comments

Comments
 (0)