def test_pick_channels_mixin():
    'Test channel-picking functionality\n    '
    evoked = read_evokeds(fname, condition=0, proj=True)
    ch_names = evoked.ch_names[:3]
    ch_names_orig = evoked.ch_names
    dummy = evoked.pick_channels(ch_names, copy=True)
    assert_equal(ch_names, dummy.ch_names)
    assert_equal(ch_names_orig, evoked.ch_names)
    assert_equal(len(ch_names_orig), len(evoked.data))
    evoked.pick_channels(ch_names)
    assert_equal(ch_names, evoked.ch_names)
    assert_equal(len(ch_names), len(evoked.data))
    evoked = read_evokeds(fname, condition=0, proj=True)
    assert_true(('meg' in evoked))
    assert_true(('eeg' in evoked))
    evoked.pick_types(meg=False, eeg=True)
    assert_true(('meg' not in evoked))
    assert_true(('eeg' in evoked))
    assert_true((len(evoked.ch_names) == 60))
Test channel-picking functionality
def test_pick_channels_mixin():
    '\n    '
    evoked = read_evokeds(fname, condition=0, proj=True)
    ch_names = evoked.ch_names[:3]
    ch_names_orig = evoked.ch_names
    dummy = evoked.pick_channels(ch_names, copy=True)
    assert_equal(ch_names, dummy.ch_names)
    assert_equal(ch_names_orig, evoked.ch_names)
    assert_equal(len(ch_names_orig), len(evoked.data))
    evoked.pick_channels(ch_names)
    assert_equal(ch_names, evoked.ch_names)
    assert_equal(len(ch_names), len(evoked.data))
    evoked = read_evokeds(fname, condition=0, proj=True)
    assert_true(('meg' in evoked))
    assert_true(('eeg' in evoked))
    evoked.pick_types(meg=False, eeg=True)
    assert_true(('meg' not in evoked))
    assert_true(('eeg' in evoked))
    assert_true((len(evoked.ch_names) == 60))