#NEWLINE# def test_out_degree_iter_weighted( self ) : #NEWLINE# #INDENT# G = self . K3 #NEWLINE# G . add_edge ( 0 , 1 , weight = 0.3 , other = 1.2 ) #NEWLINE# assert_equal ( list ( G . out_degree_iter ( weight = 'weight' ) ) , [ ( 0 , 1.3 ) , ( 1 , 2 ) , ( 2 , 2 ) ] ) #NEWLINE# assert_equal ( dict ( G . out_degree_iter ( weight = 'weight' ) ) , { #NEWLINE# #INDENT# 0 : 1.3 , #NEWLINE# 1 : 2 , #NEWLINE# 2 : 2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_equal ( list ( G . out_degree_iter ( 0 , weight = 'weight' ) ) , [ ( 0 , 1.3 ) ] ) #NEWLINE# assert_equal ( list ( G . out_degree_iter ( weight = 'other' ) ) , [ ( 0 , 2.2 ) , ( 1 , 2 ) , ( 2 , 2 ) ] ) #NEWLINE# assert_equal ( dict ( G . out_degree_iter ( weight = 'other' ) ) , { #NEWLINE# #INDENT# 0 : 2.2 , #NEWLINE# 1 : 2 , #NEWLINE# 2 : 2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_equal ( list ( G . out_degree_iter ( 0 , weight = 'other' ) ) , [ ( 0 , 2.2 ) ] )