Skip to content

Commit e097bcd

Browse files
committed
test case for lcm using gcd
1 parent d0895a6 commit e097bcd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_math.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
from pygorithm.math import (
44
lcm,
5+
lcm_using_gcd,
56
sieve_of_eratosthenes)
67

78
class TestLCM(unittest.TestCase):
89
def test_lcm(self):
910
self.assertEqual(lcm.lcm([3, 12, 16]), 48)
1011

12+
def test_lcm_using_gcd(self):
13+
self.assertEqual(lcm_using_gcd.lcm_using_gcd([3, 12, 16]), 48)
14+
1115
class TestSieveOfEratosthenes(unittest.TestCase):
1216
def test_sieve_of_eratosthenes(self):
1317
self.assertEqual(sieve_of_eratosthenes.sieve_of_eratosthenes(10), [2, 3, 5, 7])

0 commit comments

Comments
 (0)