#NEWLINE# def test_pre_and_postorder( self ) : #NEWLINE# #INDENT# 'Pre and post order traversal of the tree' #NEWLINE# exp = [ 'root' , 'i1' , 'a' , 'b' , 'i1' , 'i2' , 'c' , 'd' , 'i2' , 'root' ] #NEWLINE# obs = [ n . name for n in self . simple_t . pre_and_postorder ( ) ] #NEWLINE# self . assertEqual ( obs , exp ) #NEWLINE# obs2 = [ n . name for n in self . simple_t . traverse ( True , True ) ] #NEWLINE# self . assertEqual ( obs2 , exp )