#NEWLINE# def test_pid_exists_let_raise( self ) : #NEWLINE# #INDENT# with mock . patch ( 'psutil._psposix.os.kill' , side_effect = OSError ( errno . EBADF , '' ) ) as m : #NEWLINE# #INDENT# self . assertRaises ( OSError , psutil . _psposix . pid_exists , os . getpid ( ) ) #NEWLINE# assert m . called