#NEWLINE# def test_read_gml( self ) : #NEWLINE# #INDENT# import os , tempfile #NEWLINE# ( fd , fname ) = tempfile . mkstemp ( ) #NEWLINE# fh = open ( fname , 'w' ) #NEWLINE# fh . write ( self . simple_data ) #NEWLINE# fh . close ( ) #NEWLINE# Gin = networkx . read_gml ( fname , relabel = True ) #NEWLINE# G = networkx . parse_gml ( self . simple_data , relabel = True ) #NEWLINE# assert_equals ( sorted ( G . nodes ( data = True ) ) , sorted ( Gin . nodes ( data = True ) ) ) #NEWLINE# assert_equals ( sorted ( G . edges ( data = True ) ) , sorted ( Gin . edges ( data = True ) ) ) #NEWLINE# os . close ( fd ) #NEWLINE# os . unlink ( fname )