Skip to content

Commit

Permalink
BUGFIX: 3-arg subtraction was not implemented.
Browse files Browse the repository at this point in the history
The following change allows use of sub like
```py
sub(5, 4, 1) #0
```
  • Loading branch information
Patrick Driscoll committed Oct 7, 2022
1 parent 0e54bd7 commit 6ebb999
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/calc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ 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()

1 comment on commit 6ebb999

@prdriscoll
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ADding a little test comment

Please sign in to comment.