def test_square_root(self): test_row_list = read_csv("square_root.csv") for row in test_row_list: a = int(row[0]) b = Decimal(row[1]) #c=float(row[2]) exp_result = self.calculator.square_root(a) self.assertEqual(exp_result, b)
def test_multiply(self): test_row_list = read_csv("multiplication.csv") for row in test_row_list: a = int(row[0]) b = int(row[1]) c = int(row[2]) exp_result = self.calculator.multiply(a, b) self.assertEqual(exp_result, c)
def test_divide(self): test_row_list = read_csv("division.csv") for row in test_row_list: a = int(row[0]) b = int(row[1]) c = float(row[2]) exp_result = self.calculator.divide(a, b) self.assertEqual(exp_result, c)
def test_subtract(self): test_row_list = read_csv("subtraction.csv") for row in test_row_list: a = int(row[0]) b = int(row[1]) c = int(row[2]) exp_result = self.calculator.subtract(a, b) self.assertEqual(exp_result, c)