def test_expression_grouping_with_multiple_op(): expr = '(2*(2+2)/4)*2' parser = ExpressionParser(expr) assert parser.expression() == (2 * (2 + 2) / 4) * 2
def test_expression_grouping_around_primary(): expr = '((((2))))' parser = ExpressionParser(expr) assert parser.expression() == 2