Skip to content

Commit 339e558

Browse files
committed
conditionalize import skips
1 parent 92caa42 commit 339e558

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mne_bids/tests/test_write.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3374,9 +3374,12 @@ def test_sidecar_encoding(_bids_validate, tmp_path):
33743374
@testing.requires_testing_data
33753375
def test_convert_eeg_formats(dir_name, fmt, fname, reader, tmp_path):
33763376
"""Test conversion of EEG/iEEG manufacturer fmt to BrainVision/EDF."""
3377-
pytest.importorskip("pybv", PYBV_VERSION)
3378-
pytest.importorskip("eeglabio", EEGLABIO_VERSION)
3379-
pytest.importorskip("curryreader", CURRYREADER_VERSION)
3377+
if dir_name == "BrainVision" or fmt == "BrainVision":
3378+
pytest.importorskip("pybv", PYBV_VERSION)
3379+
elif dir_name == "EEGLAB" or fmt == "EEGLAB":
3380+
pytest.importorskip("eeglabio", EEGLABIO_VERSION)
3381+
elif dir_name == "curry" or fmt == "curry":
3382+
pytest.importorskip("curryreader", CURRYREADER_VERSION)
33803383
bids_root = tmp_path / fmt
33813384
raw_fname = data_path / dir_name / fname
33823385

0 commit comments

Comments
 (0)