def testPidExists(self): """ Test if pid given exists. """ mypid = os.getpid() self.assertTrue(misc.pidExists(mypid))
def testPidDoesNotExist(self): """ Test if when given incorrect input the method works correctly. """ # FIXME : There is no way real way know what process aren't working. # I'll just try and see if there is **any** occasion where it works # If anyone has any idea. You are welcome to change this pid = os.getpid() result = True while result: pid += 1 result = misc.pidExists(pid)