def test_index(): hset = HashSet(2) N = 1000 for i in xrange(N): hset.add(i) for i in xrange(N): assert i in hset.entries_with_index(hset.index(i))
def test_index_nonpresent(): hset = HashSet(2) hset.index(0)