#NEWLINE# def testKeepAfterClose( self ) : #NEWLINE# #INDENT# 'Verify various auto-cleanup methods.' #NEWLINE# with fileutils . NamedTemporaryDirectory ( ) as d : #NEWLINE# #INDENT# tmpdir_path = d . name #NEWLINE# self . assertExists ( d . name ) #NEWLINE# d . keep ( ) #NEWLINE# #UNINDENT# self . assertExists ( tmpdir_path ) #NEWLINE# shutil . rmtree ( tmpdir_path ) #NEWLINE# self . assertNotExists ( tmpdir_path )