#NEWLINE# def test_predecessors_iter( self ) : #NEWLINE# #INDENT# G = G . K3 #NEWLINE# assert_equal ( sorted ( G . predecessors_iter ( 0 ) ) , [ 1 , 2 ] ) #NEWLINE# assert_raises ( ( KeyError , networkx . NetworkXError ) , G . predecessors_iter , ( - 1 ) )