def test4(self): self.directed.add_edges_from([[1, 2], [2, 3]]) self.directed.add_edges_from([[3, 4]]) assert (PCAlg.findPath(1, 4, self.directed, []))
def test6(self): self.directed.add_edges_from([[1, 3]]) self.directed.add_edges_from([[1, 2], [3, 4], [3, 5]]) assert (not PCAlg.findPath(2, 5, self.directed, []))
def test2(self): self.directed.add_edges_from([[1, 2], [2, 3]]) assert (not PCAlg.findPath(1, 5, self.directed, []))