#NEWLINE# def test_memory_info( self ) : #NEWLINE# #INDENT# mem = psutil . Process ( ) . memory_info ( ) #NEWLINE# with mock . patch ( 'psutil._psplatform.cext.proc_memory_info' , side_effect = OSError ( errno . EPERM , 'msg' ) ) as fun : #NEWLINE# #INDENT# ( psutil . Process ( ) . memory_info ( ) == self ) #NEWLINE# assert fun . called