trnslator/tests/test_utils.py
Unknown dfdf384a40 Test rotate()
increase coverage
2020-06-24 15:22:28 -04:00

19 lines
243 B
Python

import pytest
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])