Skip to content

Commit 151e6c6

Browse files
committed
BUGFIX: 3-arg-subtraction was not implemented
The following change allows use of sub like ```py sub(5, 4, 1) #0 ``` We promised customers we would have this in our initial release, so this is a bug, not an enhancement.
1 parent 0e54bd7 commit 151e6c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/calc_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def test_sub_2arg(self):
1717
# Make sure 4 - 3 = 1
1818
self.assertEqual(sub(4, 3), 1, 'subtracting three from four')
1919

20+
def test_sub_3arg(self):
21+
self.assertEqual(sub(4, 3, 1), 0, 'subtracting three from four and then one from result')
2022

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

0 commit comments

Comments
 (0)