Exemple #1
0
def test_mult_div():
    expr = '782/3.312'
    parser = ExpressionParser(expr)
    assert parser.multiplication() == 782 / 3.312
Exemple #2
0
def test_mult_combined_with_div():
    expr = '25*5/5*2.5'
    parser = ExpressionParser(expr)
    assert parser.multiplication() == (25 * 5) / (5 * 2.5)
Exemple #3
0
def test_mult():
    expr = '23*-12.29'
    parser = ExpressionParser(expr)
    assert parser.multiplication() == 23 * (-12.29)