#NEWLINE# def test_edgelist_digraph( self ) : #NEWLINE# #INDENT# G = self . DG #NEWLINE# ( fd , fname ) = tempfile . mkstemp ( ) #NEWLINE# nx . write_edgelist ( G , self ) #NEWLINE# H = nx . read_edgelist ( fname , create_using = nx . DiGraph ( ) ) #NEWLINE# G . remove_node ( 'g' ) #NEWLINE# H2 = nx . read_edgelist ( fname , create_using = nx . DiGraph ( ) ) #NEWLINE# assert_not_equal ( H , H2 ) #NEWLINE# assert_equal ( sorted ( H . nodes ( ) ) , sorted ( G . nodes ( ) ) ) #NEWLINE# assert_equal ( sorted ( H . edges ( ) ) , sorted ( G . edges ( ) ) ) #NEWLINE# os . close ( fd ) #NEWLINE# os . unlink ( fname )