def test_rotate_minus_5(): d = DoubleLinkedList([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) d.rotate(-5) assert (len(d)) == 10 assert list(d) == [6, 7, 8, 9, 10, 1, 2, 3, 4, 5]
def test_rotate_2(): d = DoubleLinkedList([1, 2, 3, 4, 5, 6]) d.rotate(2) assert (len(d)) == 6 assert list(d) == [5, 6, 1, 2, 3, 4]
def test_rotate__minus_1(): d = DoubleLinkedList([1, 2, 3, 4]) d.rotate(-1) assert list(d) == [2, 3, 4, 1]
def test_rotate_1(): d = DoubleLinkedList([1, 2, 3, 4]) d.rotate(1) assert (len(d)) == 4 assert list(d) == [4, 1, 2, 3]
def test_rotate_minus_5(): d = DoubleLinkedList([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) d.rotate(-5) assert (len(d)) == 10 assert list(d) == [6, 7 ,8 , 9, 10, 1, 2, 3, 4, 5]