def test_getAndSetNonPrimitiveProperties(): calc = Calculator() calc.add(3_200_000) calc.neg() calc.curr = Multiply(Number(2), calc.curr) assert calc.value == -6_400_000
def test_subclassing(): calc = Calculator() calc.curr = AddTen(33) calc.neg() assert calc.value == -43