コード例 #1
0
 def test_top_of_empty(self, int_stack: PushStack):
     assert int_stack.top() == Token.no_stack_item
コード例 #2
0
 def test_top(self, int_stack: PushStack):
     int_stack.push(5).push(-10)
     assert int_stack.top() == -10
コード例 #3
0
ファイル: test_stack.py プロジェクト: erp12/Pysh
 def test_top(self, int_stack: PushStack):
     int_stack.push(5).push(-10)
     assert int_stack.top() == -10
コード例 #4
0
ファイル: test_stack.py プロジェクト: erp12/Pysh
 def test_top_of_empty(self, int_stack: PushStack):
     assert int_stack.top() == Token.no_stack_item
コード例 #5
0
ファイル: test_stack.py プロジェクト: erp12/Pysh
 def test_init_values(self):
     stack = PushStack(PushStr, ["bottom", "middle", "top"])
     assert stack.top() == "top"
     assert list(stack) == ["bottom", "middle", "top"]