mirror of
https://github.com/louisleroy5/trnslator.git
synced 2024-11-14 16:20:31 -05:00
Test rotate()
increase coverage
This commit is contained in:
parent
565c8a4251
commit
dfdf384a40
|
@ -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])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user