def test_transformer(self): tree = _syntaxParser.parse(self.example_string) proc_transformer = ProcessTransformer() wplan_transformer = WorkplanTransformer() # it's important to use the ProcessTransformer first obj_tree = proc_transformer.transform(tree) # processes are now created, launch sections need existing processes wplan_transformer.transform(obj_tree) # check if the rigt process was created pm = ProcessManager() pcb_b = pm.getProcessByName('B') # we check the priorith and the name here.... self.assertTrue(pcb_b.process.name, 'B') self.assertTrue(pcb_b.priority, 7)
def tearDown(self): ProcessManager._drop()