@testing.requires_testing_data
def test_time_index():
 raw_fname = op.join(op.dirname(__file__), '..', '..', 'io', 'tests', 'data', 'test_raw.fif')
 raw = read_raw_fif(raw_fname)
 orig_inds = raw.time_as_index(raw.times)
 assert (len(set(orig_inds)) != len(orig_inds))
 new_inds = raw.time_as_index(raw.times, use_rounding=True)
 assert (len(set(new_inds)) == len(new_inds))

@ testing . requires_testing_data def test_time_index ( ) : raw_fname = op . join ( op . dirname ( __file__ ) , '..' , '..' , 'io' , 'tests' , 'data' , 'test_raw.fif' ) raw = read_raw_fif ( raw_fname ) orig_inds = raw . time_as_index ( raw . times ) assert ( len ( set ( orig_inds ) ) != len ( orig_inds ) ) new_inds = raw . time_as_index ( raw . times , use_rounding = True ) assert ( len ( set ( new_inds ) ) == len ( new_inds ) )
test indexing of raw times .