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