Skip to content

Commit

Permalink
Add new test case for add() (#40)
Browse files Browse the repository at this point in the history
It turns out that we need test coverage for 0+0+0=0

Don't ask me why please
  • Loading branch information
mike-north authored Feb 26, 2021
1 parent 413d8c0 commit 0e54bd7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/calc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ def test_add_2arg(self):
def test_add_3arg(self):
self.assertEqual(add(3, 5, 2), 10, 'adding three, five and two')

def test_add_zeroes(self):
self.assertEqual(add(0, 0, 0), 0 , 'adding zeroes together is zero')

def test_sub_2arg(self):
# Make sure 4 - 3 = 1
self.assertEqual(sub(4, 3), 1, 'subtracting three from four')
Expand Down

0 comments on commit 0e54bd7

Please sign in to comment.