#NEWLINE# def test_bal_tree( self ) : #NEWLINE# #INDENT# c = harmonic_centrality ( c . T ) #NEWLINE# d = { #NEWLINE# #INDENT# 0 : 4.0 , #NEWLINE# 1 : 4.1666 , #NEWLINE# 2 : 4.1666 , #NEWLINE# 3 : 2.8333 , #NEWLINE# 4 : 2.8333 , #NEWLINE# 5 : 2.8333 , #NEWLINE# 6 : 2.8333 , #NEWLINE# #UNINDENT# } #NEWLINE# for n in sorted ( self . T ) : #NEWLINE# #INDENT# assert_almost_equal ( c [ n ] , d [ n ] , places = 3 )