def test_shift_window(): assert DerivationProcessor.shift_window([[0, 0, 2, 3]], one_level.window, 4) == [[0, 4, 2, 7]] assert DerivationProcessor.shift_window([[1, 1, 3, 2]], one_level.window, 4) == [[1, 5, 3, 6]] assert DerivationProcessor.shift_window([[0, 0, 2, 2]], other_level.window, 4) == [[0, 4, 2, 6]] assert DerivationProcessor.shift_window([[0, 0, 3, 3]], other_level.window, 4) == [[0, 4, 3, 7]]
def test_shift_window(): assert DerivationProcessor.shift_window([[0, 0], [1, 1]], WithinTrial(lambda x: x, None), 0) == [[0, 0], [1, 1]] assert DerivationProcessor.shift_window([[0, 0], [1, 1]], Transition(lambda x: x, None), 4) == [[0, 4], [1, 5]] assert DerivationProcessor.shift_window([[0, 2, 4], [1, 3, 5]], Window(lambda x: x, [1, 2], 2, 3), 6) == [[0, 8, 16], [1, 9, 17]] assert DerivationProcessor.shift_window([[1, 1, 1, 1], [2, 2, 2, 2]], Window(lambda x: x, [1, 2], 2, 4), 10) == \ [[1, 11, 21, 31], [2, 12, 22, 32]]