def test_division_before_addition(self): assert math_expr.evaluate('2 + 4 / 2') == 4
def test_division_before_subtraction(self): assert math_expr.evaluate('2 - 4 / 2') == 0
def test_multiplication_before_addition(self): assert math_expr.evaluate('1 + 1 * 2') == 3
def test_multiplication_before_subtraction(self): assert math_expr.evaluate('2 - 1 * 2') == 0
def test_parentheses(self): assert math_expr.evaluate('(1 + 1) * 2') == 4
def test_division(self): assert math_expr.evaluate('4 / 2') == 2
def test_multiplication(self): assert math_expr.evaluate('2 * 2') == 4
def test_subtraction(self): assert math_expr.evaluate('1 - 1') == 0
def test_addition(self): assert math_expr.evaluate('1 + 1') == 2