def test_proctree_check(): p4 = Proc() p5 = Proc(id='p4') ProcTree.register(p4) ProcTree.register(p5) with pytest.raises(ProcTreeProcExists): ProcTree.check(p4)
def testCheck(self, proc, r): ProcTree.register(proc) if r: self.assertRaises(ProcTreeProcExists, ProcTree.check, proc) else: ProcTree.check(proc)