def test_proctree_getnext_and_reset(): p10 = Proc() p11 = Proc() p11.depends = p10 ProcTree.register(p10) ProcTree().init() assert ProcTree.getNext(p10) == [p11] assert ProcTree.getNext(p11) == [] ProcTree.reset() ProcTree.NODES[p10].prev == [] ProcTree.NODES[p10].next == [] ProcTree.NODES[p11].prev == [] ProcTree.NODES[p11].next == [] ProcTree.NODES[p10].ran == False ProcTree.NODES[p10].start == False ProcTree.NODES[p11].ran == False ProcTree.NODES[p11].start == False
def testGetNext(self, procs, proc, outs): for p in procs: ProcTree.register(p) ProcTree() nexts = ProcTree.getNext(proc) self.assertCountEqual(nexts, outs)