def test_addition_integers(self): """ Test addition of two integers returns the correct total. """ result = simple_calc.add(1, 2) self.assertEqual(result, 3)
def test_adding_on_window(self): result = simple_calc.add(1, 2) self.assertEqual(result, 3)
def test_add_strings(self): """ Test addition of two strings returns a concantenated string. """ result = simple_calc.add('abc', 'def') self.assertEqual(result, 'abcdef')
def test_addition_floats(self): """ Test addition of two floats returns the correct total. """ result = simple_calc.add(10.5, 2) self.assertEqual(result, 12.5)
def test_add(): assert simple_calc.add(0, 0) == 0 assert simple_calc.add(-1, -1) == -2 assert simple_calc.add(4, 5) == 9 assert simple_calc.add(1, 2, 3, 4, 5) == 15
def test_add(self): self.assertEqual(simple_calc.add(5, 3), 8) self.assertEqual(simple_calc.add(5, -3), 2) self.assertEqual(simple_calc.add(-5, -3), -8)