mirror of
https://github.com/louisleroy5/trnslator.git
synced 2024-11-15 00:30:31 -05:00
0a1ab1a9a5
Increase coverage
28 lines
400 B
Python
28 lines
400 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])
|
|
|
|
|
|
def test_lcm(config):
|
|
# This function takes two integers and returns the L.C.M.
|
|
x = 10
|
|
y = 50
|
|
lcm = utils.lcm(x, y)
|
|
|
|
assert (lcm == 5)
|
|
|
|
|
|
|
|
|
|
|
|
|