pymdht icon indicating copy to clipboard operation
pymdht copied to clipboard

Fix two broken unit tests

Open LipuFei opened this issue 10 years ago • 0 comments

Two unit tests are broken:

======================================================================
ERROR: test_report_unreachable (pymdht.core.test_boostrap.TestBootstrap)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lfei/workspace/tud/p2p/pymdht/core/test_boostrap.py", line 53, in test_report_unreachable
    b.report_unreachable(addrs[0])
IndexError: list index out of range
-------------------- >> begin captured logging << --------------------
dht: DEBUG: bootstrap_stable: 1 hardcoded, 1 stable
dht: DEBUG: bootstrap_stable: 1 hardcoded, 0 unstable
dht: DEBUG: bootstrap_unstable: 2006 hardcoded, 0 unstable
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test_general (pymdht.core.test_boostrap.TestBootstrap)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lfei/workspace/tud/p2p/pymdht/core/test_boostrap.py", line 28, in test_general
    self.assertEqual(len(b.get_sample_unstable_addrs(5)), 5)
AssertionError: 0 != 5
-------------------- >> begin captured logging << --------------------
dht: DEBUG: bootstrap_stable: 1 hardcoded, 1 stable
dht: DEBUG: bootstrap_stable: 1 hardcoded, 0 unstable
dht: DEBUG: bootstrap_unstable: 2006 hardcoded, 0 unstable
--------------------- >> end captured logging << ---------------------

LipuFei avatar Jan 27 '15 11:01 LipuFei