def test_blocks(self): sh1 = Simhash('foobar') sh2 = Simhash() sh2.update('foo') sh2.update('bar') self.assertEqual(sh1.value, sh2.value)
def test_incremental_value(self): sh = Simhash(['aaa']) sh.update(['bbb']) self.assertEqual(sh.value, 8637903533912358349)