def test_evoked_with_missing_channels(): """Test _create_info on evoked data when channels are missing from info.""" cur_system = 'neuromag306' test_data_folder_ft = get_data_paths(cur_system) info = get_raw_info(cur_system) del info['chs'][1:20] info._update_redundant() with pytest.warns(RuntimeWarning): mne.read_evoked_fieldtrip( os.path.join(test_data_folder_ft, 'averaged_v7.mat'), info)
def test_throw_exception_on_cellarray(version, type): """Test for a meaningful exception when the data is a cell array.""" fname = os.path.join(get_data_paths('cellarray'), '%s_%s.mat' % (type, version)) info = get_raw_info('CNT') with pytest.raises(RuntimeError, match='Loading of data in cell arrays ' 'is not supported'): if type == 'averaged': mne.read_evoked_fieldtrip(fname, info) elif type == 'epoched': mne.read_epochs_fieldtrip(fname, info) elif type == 'raw': mne.io.read_raw_fieldtrip(fname, info)