def test_dupicate_nonempty(self): stack = Stack([True]) stack.dup() assert len(stack) is 2 and stack[-1]
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
def test_duplicate_empty(self): stack = Stack() stack.dup() assert stack.isempty() is True