示例#1
0
 def test_sub(self):
     operation = Operation(4, 2)
     result = operation.sub()
     self.assertEqual(result, 2)
示例#2
0
 def test_assertion_2(self):
     operation = Operation(3, 4)
     self.assertIsInstance(operation, Operation)
示例#3
0
 def test_add(self):
     """test add method of Operation class"""
     operation = Operation(3, 4)
     result = operation.add()
     self.assertEqual(result, 7)
示例#4
0
 def test_add_1(self):
     operation = Operation(10, 3)
     result = operation.add()
     self.assertNotEqual(result, 12)
示例#5
0
 def test_add_1(self):
     operation = Operation(4, 4)
     result = operation.add()
     self.assertEqual(result, 8)