

def test_maxSize(self):
    n = NodeHeap(mknode(intid=0), 3)
    self.assertEqual(0, len(n))
    for d in range(10):
        n.push(mknode(intid=d))
    self.assertEqual(3, len(n))
    self.assertEqual(3, len(list(n)))

dataset/ETHPy150Open OpenBazaar/OpenBazaar-Server/dht/tests/test_node.py NodeHeapTest.test_maxSize/original