Test rotate()

increase coverage
This commit is contained in:
Unknown 2020-06-24 15:22:28 -04:00
parent 565c8a4251
commit dfdf384a40

View File

@ -3,6 +3,16 @@ import pytest
from translater import utils from translater import utils
def test_rotate(config):
# Shift list elements to the left
l1 = [1, 2, 3] # list
n = 1 # shift 1 position to the left
l2 = utils.rotate(l1, n)
assert (l2 == [2, 3, 1])