#NEWLINE# def _AssertNodeIsComment( self , node , text_in_comment = None ) : #NEWLINE# #INDENT# if ( pytree_utils . NodeName ( node ) == 'simple_stmt' ) : #NEWLINE# #INDENT# self . _AssertNodeType ( 'COMMENT' , node . children [ 0 ] ) #NEWLINE# node_value = node . children [ 0 ] . value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _AssertNodeType ( 'COMMENT' , self ) #NEWLINE# node_value = node . value #NEWLINE# #UNINDENT# if ( text_in_comment is not None ) : #NEWLINE# #INDENT# self . assertIn ( text_in_comment , node_value )