def test_get_event_data():
 raw = mne.io.read_raw_fif(raw_fname, preload=True, verbose=False)
 picks = mne.pick_types(raw.info, meg='grad', eeg=False, eog=True, stim=True, exclude=raw.info['bads'])
 (event_id, tmin, tmax) = (2, (-0.1), 0.3)
 epochs = Epochs(raw, events, event_id=event_id, tmin=tmin, tmax=tmax, picks=picks, baseline=None, preload=True, proj=False)
 data = epochs.get_data()[0, :, :]
 rt_client = MockRtClient(raw)
 rt_data = rt_client.get_event_data(event_id=event_id, tmin=tmin, tmax=tmax, picks=picks, stim_channel='STI 014')
 assert_array_equal(rt_data, data)

def test_get_event_data ( ) : raw = mne . io . read_raw_fif ( raw_fname , preload = True , verbose = False ) picks = mne . pick_types ( raw . info , meg = 'grad' , eeg = False , eog = True , stim = True , exclude = raw . info [ 'bads' ] ) ( event_id , tmin , tmax ) = ( 2 , ( - 0.1 ) , 0.3 ) epochs = Epochs ( raw , events , event_id = event_id , tmin = tmin , tmax = tmax , picks = picks , baseline = None , preload = True , proj = False ) data = epochs . get_data ( ) [ 0 , : , : ] rt_client = MockRtClient ( raw ) rt_data = rt_client . get_event_data ( event_id = event_id , tmin = tmin , tmax = tmax , picks = picks , stim_channel = 'STI 014' ) assert_array_equal ( rt_data , data )
test emulation of realtime data stream .