#NEWLINE# def test_singleton( self ) : #NEWLINE# #INDENT# G = nx . DiGraph ( ) #NEWLINE# G . add_node ( 0 ) #NEWLINE# c = harmonic_centrality ( d , distance = 'weight' ) #NEWLINE# d = { #NEWLINE# #INDENT# 0 : 0 , #NEWLINE# #UNINDENT# } #NEWLINE# assert_equal ( c , d )