#NEWLINE# def test_havel_hakimi_construction( ) : #NEWLINE# #INDENT# G = havel_hakimi_graph ( [ ] ) #NEWLINE# assert_equal ( len ( G ) , 0 ) #NEWLINE# z = [ 1000 , 3 , 3 , 3 , 3 , 2 , 2 , 2 , 1 , 1 , 1 ] #NEWLINE# assert_raises ( networkx . exception . NetworkXError , havel_hakimi_graph , z ) #NEWLINE# z = [ 'A' , 3 , 3 , 3 , 3 , 2 , 2 , 2 , 1 , 1 , 1 ] #NEWLINE# assert_raises ( networkx . exception . NetworkXError , havel_hakimi_graph , z ) #NEWLINE# z = [ 5 , 4 , 3 , 3 , 3 , 2 , 2 , 2 ] #NEWLINE# G = havel_hakimi_graph ( G ) #NEWLINE# G = configuration_model ( z ) #NEWLINE# z = [ 6 , 5 , 4 , 4 , 2 , 1 , 1 , 1 ] #NEWLINE# assert_raises ( networkx . exception . NetworkXError , havel_hakimi_graph , z ) #NEWLINE# z = [ 10 , 3 , 3 , 3 , 3 , 2 , 2 , 2 , 2 , 2 , 2 ] #NEWLINE# G = havel_hakimi_graph ( z ) #NEWLINE# assert_raises ( networkx . exception . NetworkXError , havel_hakimi_graph , z , create_using = DiGraph ( ) )