def test_stack_opper_swap_subtract(self): stack = Stack() stack.append(5) stack.append(10) stack.swap() stack.math.subtract() assert len(stack) is 1 and stack[-1] is 5
def test_stack_opper_dup_add(self): stack = Stack() stack.append(1) stack.dup() stack.math.add() assert len(stack) is 1 and stack[-1] is 2