Пример #1
0
def test_is_empty():
    stack = Stack()
    stack.push(1)
    stack.pop()
    actual = stack.is_empty()
    expected = True
    assert actual == expected
Пример #2
0
def test_pop_until_empty():
    s = Stack()
    s.push("apple")
    s.push("banana")
    s.push("cucumber")
    s.pop()
    s.pop()
    s.pop()
    actual = s.is_empty()
    expected = True
    assert actual == expected