示例#1
0
def test_is_empty_when_emptied():
    q = Queue()
    q.enqueue('spam')
    q.enqueue('eggs')
    q.dequeue()
    q.dequeue()
    expected = True
    actual = q.is_empty()
    assert actual == expected
示例#2
0
def test_is_not_empty_when_full():
    q = Queue()
    q.enqueue('spam')
    expected = False
    actual = q.is_empty()
    assert actual == expected
示例#3
0
def test_is_empty_fresh():
    q = Queue()
    expected = True
    actual = q.is_empty()
    assert actual == expected