示例#1
0
 def test_oserror(self, m_kill):
     with pytest.raises(OSError):
         watch_ww3._pid_exists(42)
示例#2
0
 def test_pid_permission_error(self, m_kill):
     pid_exists = watch_ww3._pid_exists(42)
     assert pid_exists
示例#3
0
 def test_no_such_pid(self, m_kill):
     pid_exists = watch_ww3._pid_exists(42)
     assert not pid_exists
示例#4
0
 def test_pid_exists(self, m_kill):
     pid_exists = watch_ww3._pid_exists(42)
     assert pid_exists
示例#5
0
 def test_zero_pid(self):
     with pytest.raises(ValueError):
         watch_ww3._pid_exists(0)
示例#6
0
 def test_negative_pid(self):
     pid_exists = watch_ww3._pid_exists(-1)
     assert not pid_exists