def test_top_of_empty(self, int_stack: PushStack): assert int_stack.top() == Token.no_stack_item
def test_top(self, int_stack: PushStack): int_stack.push(5).push(-10) assert int_stack.top() == -10
def test_init_values(self): stack = PushStack(PushStr, ["bottom", "middle", "top"]) assert stack.top() == "top" assert list(stack) == ["bottom", "middle", "top"]