From 81821b35835971e8adfb509d64f864223ceed218 Mon Sep 17 00:00:00 2001 From: AnupamBahl <13972559+AnupamBahl@users.noreply.github.com> Date: Sat, 7 Oct 2023 17:39:26 -0700 Subject: [PATCH] Adding more tests --- data_structures/stacks/stack_tracking_min_max.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/data_structures/stacks/stack_tracking_min_max.py b/data_structures/stacks/stack_tracking_min_max.py index 102504446..6c638110d 100644 --- a/data_structures/stacks/stack_tracking_min_max.py +++ b/data_structures/stacks/stack_tracking_min_max.py @@ -152,6 +152,15 @@ class MinMaxStack: def stack_is_valid(self) -> bool: """ 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: print("Stack is empty")