def test_oserror(self, m_kill): with pytest.raises(OSError): watch_ww3._pid_exists(42)
def test_pid_permission_error(self, m_kill): pid_exists = watch_ww3._pid_exists(42) assert pid_exists
def test_no_such_pid(self, m_kill): pid_exists = watch_ww3._pid_exists(42) assert not pid_exists
def test_pid_exists(self, m_kill): pid_exists = watch_ww3._pid_exists(42) assert pid_exists
def test_zero_pid(self): with pytest.raises(ValueError): watch_ww3._pid_exists(0)
def test_negative_pid(self): pid_exists = watch_ww3._pid_exists(-1) assert not pid_exists