pombreda / cdpedia

Automatically exported from code.google.com/p/cdpedia
0 stars 0 forks source link

problema con easy_index / coherent_hash #125

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. correr los tests: $ PYTHONPATH=. python tests/test_indice.py

What is the expected output? What do you see instead?

======================================================================
ERROR: test_return_quantity (__main__.TestCreateEasy)
Must return the quantity indexed.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_indice.py", line 280, in test_return_quantity
    q = self.index.create(self.tempdir, [("a", 1)])
  File "/home/san/Downloads/cdpedia/trunk/src/armado/easy_index.py", line 203, in create
    cual = utiles.coherent_hash(k) % N
  File "/home/san/Downloads/cdpedia/trunk/src/utiles.py", line 58, in coherent_hash
    return int(md5(txt).hexdigest()[-6:], 16)
TypeError: must be string or buffer, not int

Original issue reported on code.google.com by gringotu...@gmail.com on 17 Jul 2011 at 7:58