예제 #1
0
    def setUp(self):
        super(TestProcess, self).setUp()

        self.events_tester = ProcessListenerTester()
        self.proc = DummyProcessWithOutput.new()
        self.proc.add_process_listener(self.events_tester)
        self.executor = ThreadExecutor()
예제 #2
0
    def setUp(self):
        import tempfile

        super(TestPicklePersistence, self).setUp()

        self.store_dir = tempfile.mkdtemp()
        self.pickle_persistence = PicklePersistence(
            running_directory=self.store_dir)
        self.procman = ThreadExecutor()
예제 #3
0
    def __init__(self, executor=None, remove_on_terminate=True):
        """
        :param executor: The executor used to play processes
        :param remove_on_terminate: Automatically remove any process that terminates
            from the control of this class.
        """
        if executor is None:
            self._executor = ThreadExecutor()
        else:
            self._executor = executor

        self._processes = {}
        self._remove_on_terminate = remove_on_terminate
예제 #4
0
 def setUp(self):
     super(TestWaitOnProcessStateEvent, self).setUp()
     self.executor = ThreadExecutor()
예제 #5
0
 def setUp(self):
     self.assertEqual(len(MONITOR.get_pids()), 0)
     self.executor = ThreadExecutor()