# test.extra.test_heap module — Python(P)DEVS-BBL documentation

# test.extra.test_heap module

Test that the heap implementation works as required.

See also

`pypdevsbbl.extra.heap`

class `test.extra.test_heap.``TestHeap`(methodName='runTest')

  Bases: `unittest.case.TestCase`

  `setUp`()

    Sets up all tests.

    Creates two heaps (a min-heap and a max-heap) and fills them with 10,000 random integers.

  `test_insert`()

    Tests the insertion in the heap.

  `test_pop`()

    Tests the pop of the max/min item in the heap.

  `test_peek`()

    Tests peeking of items (and regaining their indexes) of the heap.