Beispiel #1
0
    def test_seal(self):
        rinfo = run(DummyProcess, _return_pid=True)[1]
        self.assertTrue(load_node(pk=rinfo).is_sealed)

        storedir = tempfile.mkdtemp()
        storage = Persistence.create_from_basedir(storedir)

        rinfo = submit(DummyProcess, _jobs_store=storage)
        n = load_node(pk=rinfo.pid)
        self.assertFalse(n.is_sealed)

        dp = DummyProcess.create_from(storage.load_checkpoint(rinfo.pid))
        dp.run_until_complete()
        self.assertTrue(n.is_sealed)
        shutil.rmtree(storedir)
Beispiel #2
0
 def setUp(self):
     super(TestRun, self).setUp()
     self.assertEquals(len(plum.process_monitor.MONITOR.get_pids()), 0)
     self.storedir = tempfile.mkdtemp()
     self.storage = Persistence.create_from_basedir(self.storedir)
Beispiel #3
0
    def setUp(self):
        self.assertEquals(len(util.ProcessStack.stack()), 0)

        self.storedir = tempfile.mkdtemp()
        self.storage = Persistence.create_from_basedir(self.storedir)