def test_calculator3(): calculator = Calculator(3) calculator.add() calculator.input(3) calculator.multiply() calculator.type(2) calculator.add() calculator.type(1) assert 7 == calculator.output()
def test_calculator_1(): calculator = Calculator(3) calculator.input(8) assert 8 == calculator.output() calculator.type(5) calculator.type(3) assert 53 == calculator.output() calculator.add() calculator.type(4) calculator.type(0) assert 93 == calculator.output() calculator.divide() calculator.type(3) assert 31 == calculator.output() calculator.multiply() calculator.type(2) assert 62 == calculator.output()