diff --git a/src/calc.py b/src/calc.py index 2af3c17..5c8ae15 100644 --- a/src/calc.py +++ b/src/calc.py @@ -18,3 +18,6 @@ def sub(a, b): ``` """ return a - b + +def sub(a, b, c=0): + return a - b - c diff --git a/src/calc_test.py b/src/calc_test.py index 2911910..4574744 100644 --- a/src/calc_test.py +++ b/src/calc_test.py @@ -16,7 +16,8 @@ def test_add_zeroes(self): def test_sub_2arg(self): # Make sure 4 - 3 = 1 self.assertEqual(sub(4, 3), 1, 'subtracting three from four') - + def test sub_3arg(self): +     self.assertEqual(sub(4, 3, 1), 0, 'subtracting three and one from four') if __name__ == '__main__': unittest.main()