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
```

We promised customers that we would have this in our initial release,
so this is a bug, not an enhancement
  • Loading branch information
Tam Nguyen committed Aug 16, 2022
1 parent 0e54bd7 commit b2e4436
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 @@ -17,6 +17,9 @@ 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 b2e4436

@mtwynn
Copy link

@mtwynn mtwynn commented on b2e4436 Aug 16, 2022

Choose a reason for hiding this comment

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

Are there any edge cases that I have forgotten? I just tried to follow previous examples of testing. Pardon my python noobiness.

Please sign in to comment.