def test_eval_exp(self): res = calc.eval_exp("2*3+4") self.assertEqual(res,10)
def test_eval_exp(self): res = calc.eval_exp([3,operator.add,4]) self.assertEqual(res,7) # 3-1+2==4 res2 = calc.eval_exp([3,operator.sub,1,operator.add,2]) self.assertEqual(res2,4)