#NEWLINE# @ preserve_random_state #NEWLINE# def test_null_and_singleton( self ) : #NEWLINE# #INDENT# G = nx . Graph ( ) #NEWLINE# for method in self . _methods : #NEWLINE# #INDENT# assert_raises ( nx . NetworkXError , nx . algebraic_connectivity , G , method = method ) #NEWLINE# assert_raises ( nx . NetworkXError , nx . fiedler_vector , G , method = method ) #NEWLINE# #UNINDENT# G . add_edge ( 0 , 0 ) #NEWLINE# for method in self . _methods : #NEWLINE# #INDENT# assert_raises ( nx . NetworkXError , nx . algebraic_connectivity , G , method = method ) #NEWLINE# assert_raises ( nx . NetworkXError , nx . fiedler_vector , G , method = self )