def test_add_pass(self): result = Example.add(self, 5, 6) # Passing self.assertEqual(result, 11)
def test_add(self): self.assertEqual(Example.add(self, 10, 20), 30) self.assertEqual(Example.add(self, 0, 0), 0) self.assertEqual(Example.add(self, -1, 1), 0)
def test_sub(self): self.assertEqual(Example.sub(self, 20, 10), 10) self.assertEqual(Example.sub(self, 50, 30), 20) self.assertEqual(Example.sub(self, 10, 10), 0)
def test_sub(self): result = Example.sub(self, 40, 20) self.assertEqual(result, 20) print("This is sub")
def test_sub(self): result = Example.sub(self, 50, 30) self.assertEqual(result, 20)
def test_add(self): result = Example.sub(self, 20, 10) self.assertEqual(result, 10)
def test_add(self): result = Example.add(self,10, 20) self.assertEqual(result, 30) print("This is addition")
def test_add_1(self): self.assertEqual(Example.add(self, 10, 40), 50) self.assertEqual(Example.add(self, 100, 100), 200)
def test_add(self): result = Example.add(self, 10, 20) self.assertEqual(result, 30)
def test_sub(self): result1 = Example.sub(self, 20, 30) self.assertEqual(result1, -10)
def test_add(self): self.assertEqual(Example.add(self, 10, 20), 30) self.assertEqual(Example.add(self, 22, 20), 42)
def test_sub(self): result = Example.sub(self, 30, 20) self.assertEqual(Example.sub(self, 30, 20), 10) self.assertEqual(Example.sub(self, 50, 60), -10)
def test_subtract(self): # result=Example.subtract(self,50,90) # self.assertEqual(result,-40) self.assertEqual(Example.subtract(self, 90, 50), 40)
def test_anotherWayToTestAdd(self): self.assertEqual(Example.add(self, 0, 0), 0) self.assertEqual(Example.add(self, -1, 1), 0)