예제 #1
0
 def test_process_weighted_hash2(self):
     simhash = Simhash()
     result = simhash.process_weighted_hash([0, 0, 0, 0])
     expected = bitarray('0000')
     assert result == expected
예제 #2
0
 def test_process_weighted_hash3(self):
     simhash = Simhash()
     result = simhash.process_weighted_hash([1, -2, -3, 4, 5, -6, 7, 0, 0])
     expected = bitarray('100110100')
     assert result == expected
예제 #3
0
 def test_process_weighted_hash1(self):
     simhash = Simhash()
     result = simhash.process_weighted_hash([1, 2, 3, 4])
     expected = bitarray('1111')
     assert result == expected