#NEWLINE# def test_patch_file( self ) : #NEWLINE# #INDENT# with tempfile . NamedTemporaryFile ( 'w+' , encoding = 'ASCII' ) as tmp : #NEWLINE# #INDENT# tmp . write ( 'x = 1L\n' ) #NEWLINE# tmp . flush ( ) #NEWLINE# stdout = self . run_sixer ( 1 , tmp . name ) #NEWLINE# tmp . seek ( 0 ) #NEWLINE# code = tmp . read ( ) #NEWLINE# self . assertEqual ( code , 'x = 1\n' )