def test_time_as_index():
 evoked = read_evokeds(fname, condition=0).crop((-0.1), 0.1)
 assert_array_equal(evoked.time_as_index([(-0.1), 0.1], use_rounding=True), [0, (len(evoked.times) - 1)])

def test_time_as_index ( ) : evoked = read_evokeds ( fname , condition = 0 ) . crop ( ( - 0.1 ) , 0.1 ) assert_array_equal ( evoked . time_as_index ( [ ( - 0.1 ) , 0.1 ] , use_rounding = True ) , [ 0 , ( len ( evoked . times ) - 1 ) ] )
test time as index .