#NEWLINE# def testSimpleInline( self ) : #NEWLINE# #INDENT# code = 'foo = 1 # and a comment\n' #NEWLINE# tree = pytree_utils . ParseCodeToTree ( expr ) #NEWLINE# comment_splicer . SpliceComments ( tree ) #NEWLINE# expr = tree . children [ 0 ] . children [ 0 ] #NEWLINE# self . _AssertNodeType ( 'expr_stmt' , expr ) #NEWLINE# self . assertEqual ( 4 , len ( expr . children ) ) #NEWLINE# comment_node = expr . children [ 3 ] #NEWLINE# self . _AssertNodeIsComment ( comment_node , '# and a comment' )