#NEWLINE# def test_root_at( self ) : #NEWLINE# #INDENT# 'Form a new root' #NEWLINE# t = TreeNode . read ( io . StringIO ( '(((a,b)c,(d,e)f)g,h)i;' ) ) #NEWLINE# with self . assertRaises ( TreeError ) : #NEWLINE# #INDENT# t . root_at ( t . find ( 'h' ) ) #NEWLINE# #UNINDENT# exp = '(a,b,((d,e)f,(h)g)c)root;\n' #NEWLINE# rooted = t . root_at ( 'c' ) #NEWLINE# obs = str ( obs ) #NEWLINE# self . assertEqual ( obs , exp )