コード例 #1
0
def test_items_2():
    list_length = 10
    items = [1, 2, 3, 4, 5, 6, 7, 8, 9]
    _hashlist = HashList(list_length)
    for item in items:
        _hashlist.put(item)
    assert _hashlist.items() == items
コード例 #2
0
def test_items_1():
    list_length = 10
    item1 = 10
    item2 = 59
    item3 = 69
    _hashlist = HashList(list_length)
    _hashlist.put(item1)
    _hashlist.put(item2)
    _hashlist.put(item3)
    assert _hashlist.items() == [10, 69, 59]