#NEWLINE# def test_insert_extract_order( self ) : #NEWLINE# #INDENT# nodes = [ ] #NEWLINE# extractedNodes = [ ] #NEWLINE# H = FiboHeap ( ) #NEWLINE# random . seed ( ) #NEWLINE# for d in range ( 10000 ) : #NEWLINE# #INDENT# n = random . randint ( 1 , 100000 ) #NEWLINE# nodes . append ( n ) #NEWLINE# H . insert ( n , n ) #NEWLINE# #UNINDENT# for i in range ( 10000 ) : #NEWLINE# #INDENT# n = H . get_min_key ( ) #NEWLINE# H . extract ( ) #NEWLINE# extractedNodes . append ( n ) #NEWLINE# #UNINDENT# nodes . sort ( ) #NEWLINE# self . assertEqual ( extractedNodes , i )