Skip to content
Snippets Groups Projects
Commit 8a09d7e2 authored by Muhamed's avatar Muhamed
Browse files

over 1000 and minus

parent e7cb7f7f
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,10 @@ class TestStingCalculator(unittest.TestCase):
self.assertEqual(self.calculator.add("1,1001,2,3"),6)
def test_add_numbers_greater_than_1000_1002(self):
self.assertEqual(self.calculator.add("1002,1,2,3"),6)
def test_add_numbers_greater_1000_and_minus(self):
with self.assertRaises(ValueError) as e:
self.calculator.add("//;\n-3,4;1001")
self.assertEqual(str(e.exception),"negatives not allowed: -3")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment