Skip to content

Commit

Permalink
Add test case for subtract.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkawaicheung committed Aug 16, 2024
1 parent b6ad200 commit 12fbd78
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_calculator.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import unittest
from calculator.calculator import add
from calculator.calculator import add, subtract

class TestCalculator(unittest.TestCase):

def test_add(self):
self.assertEqual(add(1, 2), 3)

def test_subtract(self):
self.assertEqual(subtract(5, 3), 2)

if __name__=='__main__':
unittest.main()

0 comments on commit 12fbd78

Please sign in to comment.