Beispiel #1
0
 def test_terminate(self, kill):
     p = Process(Mock())
     p.pid = 1234
     p.terminate()
     kill.assert_called_once_with(p.pid, 9)
Beispiel #2
0
 def test_terminate_not_forked(self, kill):
     p = Process(Mock())
     p.terminate()
     self.assertFalse(kill.called)
Beispiel #3
0
 def test_terminate_not_forked(self, kill):
     p = Process(Mock())
     p.terminate()
     self.assertFalse(kill.called)
Beispiel #4
0
 def test_terminate(self, kill):
     p = Process(Mock())
     p.pid = 1234
     p.terminate()
     kill.assert_called_once_with(p.pid, 9)