def test_clear_2(): a = MinHash(20, 5, False, track_abundance=False) a.add_hash(10) assert a.get_mins() == [10] a.clear() assert a.get_mins() == []
def test_clear(): a = MinHash(20, 5, False, track_abundance=True) a.add_hash(10) assert a.get_mins(with_abundance=True) == {10: 1} a.clear() assert a.get_mins(with_abundance=True) == {}