Beispiel #1
0
def test_hashIdx_in_range():
    ht = HashTable()
    assert 0 <= ht._getHashIndex(ht._makeHash('eggs')) < len(ht._data)
Beispiel #2
0
def test_hash_makeHash_deterministic():
    ht = HashTable()
    assert ht._makeHash('taco') == ht._makeHash('taco')
Beispiel #3
0
def test_hash_makeHash_deterministic_diff():
    ht = HashTable()
    assert not ht._makeHash('taco') == ht._makeHash('bell')