#NEWLINE# def test_purge_metadata_error( self ) : #NEWLINE# #INDENT# with mock . patch ( 'pants.pantsd.process_manager.rm_rf' ) as mock_rm : #NEWLINE# #INDENT# mock_rm . side_effect = OSError ( errno . EACCES , os . strerror ( errno . EACCES ) ) #NEWLINE# with self . assertRaises ( ProcessManager . MetadataError ) : #NEWLINE# #INDENT# ProcessMetadataManager . purge_metadata_by_name ( self . NAME ) #NEWLINE# #UNINDENT# #UNINDENT# self . assertGreater ( self . call_count , 0 )