Skip to content

Commit ecb889a

Browse files
committed
Add tests
1 parent fb60766 commit ecb889a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

tests/test_calculator.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import unittest
2-
from pgb import add, mul
2+
3+
from pgb import add, mul, pow, sub
34

45

56
class TestCalculator(unittest.TestCase):
@@ -14,5 +15,19 @@ def test_mul(self):
1415
self.assertEqual(mul.mul(a, b), 50)
1516

1617

18+
def test_sub(self):
19+
a = 5
20+
b = 10
21+
self.assertEqual(sub.sub(a, b), -5)
22+
23+
24+
def test_pow(self):
25+
a = 2
26+
b = 10
27+
self.assertEqual(pow.pow(a, b), 1024)
28+
29+
30+
31+
1732
if __name__ == '__main__':
1833
unittest.main()

0 commit comments

Comments
 (0)