#NEWLINE# def test_pre_and_postorder_no_children( self ) : #NEWLINE# #INDENT# t = TreeNode ( 'brofist' ) #NEWLINE# exp = [ 'brofist' ] #NEWLINE# obs = [ n . name for n in t . pre_and_postorder ( ) ] #NEWLINE# self . assertEqual ( obs , exp ) #NEWLINE# obs = list ( t . pre_and_postorder ( include_self = False ) ) #NEWLINE# self . assertEqual ( obs , [ ] )