Skip to content

Commit 98a0e7b

Browse files
author
Jinay Shah
committed
Add tests
1 parent fb60766 commit 98a0e7b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/test_calculator.py

Lines changed: 13 additions & 2 deletions
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):
@@ -13,6 +14,16 @@ def test_mul(self):
1314
b = 10
1415
self.assertEqual(mul.mul(a, b), 50)
1516

17+
def test_sub(self):
18+
a = 5
19+
b = 10
20+
self.assertEqual(sub.sub(a, b), -5)
21+
22+
def test_pow(self):
23+
a = 2
24+
b = 10
25+
self.assertEqual(pow.pow(a, b), 1024)
26+
1627

17-
if __name__ == '__main__':
28+
if __name__ == "__main__":
1829
unittest.main()

0 commit comments

Comments
 (0)