From 01a703a25a29d495c412f0e32c3c4a73c4209f93 Mon Sep 17 00:00:00 2001 From: Corey Hamren Date: Tue, 9 May 2023 08:48:17 -0700 Subject: [PATCH 1/2] BUGFIX: 3-arg subtraction was not implemented. We promised customers that we would have this in our initial release, to this is a bug, not an enhancement --- src/calc_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/calc_test.py b/src/calc_test.py index 2911910..18deddd 100644 --- a/src/calc_test.py +++ b/src/calc_test.py @@ -17,6 +17,11 @@ 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): + # Make sure 4 - 3 = 1 + self.assertEqual(sub(4, 3, 1,), 0, 'subtracting three from four') + if __name__ == '__main__': unittest.main() From 1d7be6f46d751701c60247dd921791823885f861 Mon Sep 17 00:00:00 2001 From: Corey <75544957+TheHamhams@users.noreply.github.com> Date: Tue, 9 May 2023 09:05:40 -0700 Subject: [PATCH 2/2] Update calc_test.py Updated comments. --- src/calc_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calc_test.py b/src/calc_test.py index 18deddd..e29b0ce 100644 --- a/src/calc_test.py +++ b/src/calc_test.py @@ -19,8 +19,8 @@ def test_sub_2arg(self): def test_sub_3arg(self): - # Make sure 4 - 3 = 1 - self.assertEqual(sub(4, 3, 1,), 0, 'subtracting three from four') + # Make sure 4 - 3 - 1 = 0 + self.assertEqual(sub(4, 3, 1,), 0, 'subtracting three and on from four') if __name__ == '__main__':