示例#1
0
 def test_wait_output_timeout_children(self, kill_process_mock):
     self.proc_mock.wait.side_effect = TimeoutExpired(3)
     self.proc_mock.children.return_value = [Mock()] * 2
     assert not rerun._wait_output(Mock(), False)
     assert kill_process_mock.call_count == 3
示例#2
0
 def test_wait_output_timeout(self, kill_process_mock):
     self.proc_mock.wait.side_effect = TimeoutExpired(3)
     self.proc_mock.children.return_value = []
     assert not rerun._wait_output(Mock(), False)
     kill_process_mock.assert_called_once_with(self.proc_mock)
示例#3
0
 def test_wait_output_is_not_slow(self, settings):
     assert rerun._wait_output(Mock(), False)
     self.proc_mock.wait.assert_called_once_with(settings.wait_command)
 def test_wait_output_timeout_children(self, kill_process_mock):
     self.proc_mock.wait.side_effect = TimeoutExpired(3)
     self.proc_mock.children.return_value = [Mock()] * 2
     assert not rerun._wait_output(Mock(), False)
     assert kill_process_mock.call_count == 3
 def test_wait_output_timeout(self, kill_process_mock):
     self.proc_mock.wait.side_effect = TimeoutExpired(3)
     self.proc_mock.children.return_value = []
     assert not rerun._wait_output(Mock(), False)
     kill_process_mock.assert_called_once_with(self.proc_mock)
 def test_wait_output_is_not_slow(self, settings):
     assert rerun._wait_output(Mock(), False)
     self.proc_mock.wait.assert_called_once_with(settings.wait_command)