#NEWLINE# def test_should_skip_files_when_these_are_modified_and_removed_in_squashed_layer( self ) : #NEWLINE# #INDENT# dockerfile = ( '\n        FROM %s\n        RUN touch /file\n        RUN chmod -R 777 /file\n        RUN rm -rf /file\n        ' % TestIntegSquash . BUSYBOX_IMAGE ) #NEWLINE# with self . Image ( dockerfile ) as image : #NEWLINE# #INDENT# with self . SquashedImage ( image , 2 ) as squashed_image : #NEWLINE# #INDENT# squashed_image . assertFileDoesNotExist ( 'file' ) #NEWLINE# squashed_image . assertFileExists ( '.wh.file' ) #NEWLINE# squashed_image . assertFileIsNotHardLink ( '.wh.file' ) #NEWLINE# with self . Container ( squashed_image ) as container : #NEWLINE# #INDENT# container . assertFileDoesNotExist ( 'file' ) #NEWLINE# self . assertEqual ( len ( squashed_image . layers ) , ( len ( dockerfile . layers ) - 1 ) )