#NEWLINE# @ contextmanager #NEWLINE# def _create_file( self , content , name ) : #NEWLINE# #INDENT# tmpdir = self . mktemp ( ) #NEWLINE# os . mkdir ( tmpdir ) #NEWLINE# fname = abspath ( join ( tmpdir , name ) ) #NEWLINE# with open ( fname , 'w' ) as f : #NEWLINE# #INDENT# f . write ( content ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# ( yield fname ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# rmtree ( tmpdir )