#NEWLINE# def test_siblings( self ) : #NEWLINE# #INDENT# 'Get the siblings' #NEWLINE# exp = [ ] #NEWLINE# obs = self . simple_t . siblings ( ) #NEWLINE# self . assertEqual ( obs , exp ) #NEWLINE# exp = [ 'i2' ] #NEWLINE# obs = self . simple_t . children [ 0 ] . siblings ( ) #NEWLINE# self . assertEqual ( [ o . name for o in obs ] , exp ) #NEWLINE# exp = [ 'c' ] #NEWLINE# obs = self . simple_t . children [ 1 ] . children [ 1 ] . siblings ( ) #NEWLINE# self . assertEqual ( [ o . name for o in obs ] , exp ) #NEWLINE# self . simple_t . append ( TreeNode ( name = 'foo' ) ) #NEWLINE# self . simple_t . append ( TreeNode ( name = 'bar' ) ) #NEWLINE# exp = [ 'i1' , 'foo' , 'bar' ] #NEWLINE# obs = self . simple_t . children [ 1 ] . siblings ( ) #NEWLINE# self . assertEqual ( [ o . name for o in obs ] , exp )