Adding more tests

This commit is contained in:
AnupamBahl 2023-10-07 17:39:26 -07:00
parent 5f31db7884
commit 81821b3583

View File

@ -152,6 +152,15 @@ class MinMaxStack:
def stack_is_valid(self) -> bool: def stack_is_valid(self) -> bool:
""" """
Validate stack is not empty Validate stack is not empty
>>> test_stack = MinMaxStack(3)
>>> test_stack.stack_is_valid()
Stack is empty
False
>>> test_stack.push_value(0)
True
>>> test_stack.stack_is_valid()
True
""" """
if len(self.stack) == 0: if len(self.stack) == 0:
print("Stack is empty") print("Stack is empty")