#NEWLINE# def test_remove_from_bin_file_exists( self ) : #NEWLINE# #INDENT# ' removing from bin should remove a file from bin ' #NEWLINE# ( _ , temp_file_path ) = tempfile . mkstemp ( ) #NEWLINE# try : #NEWLINE# #INDENT# with open ( temp_file_path , 'w+' ) as temp_file : #NEWLINE# #INDENT# temp_file . write ( 'hobo' ) #NEWLINE# #UNINDENT# self . directory . symlink_to_bin ( 'newfile' , temp_file_path ) #NEWLINE# self . directory . remove_from_bin ( 'newfile' ) #NEWLINE# assert ( not os . path . exists ( os . path . join ( self . directory . bin_path ( ) , 'newfile' ) ) ) #NEWLINE# os . mkdir ( os . path . join ( self . directory . bin_path ( ) , 'newfolder' ) ) #NEWLINE# self . directory . remove_from_bin ( 'newfolder' ) #NEWLINE# assert ( not os . path . exists ( os . path . join ( self . directory . bin_path ( ) , 'newfolder' ) ) ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# os . unlink ( temp_file_path )